@@ -20,8 +20,8 @@ struct xmlParserOption : Hashable {
2020 let rawValue : UInt32 = 0
2121}
2222
23- var XML_PARSE_NOENT : xmlParserOption { get { return xmlParserOption ( ) } }
24- var XML_PARSE_DTDLOAD : xmlParserOption { get { return xmlParserOption ( ) } }
23+ var XML_PARSE_NOENT : xmlParserOption { get { return xmlParserOption ( ) } }
24+ var XML_PARSE_DTDLOAD : xmlParserOption { get { return xmlParserOption ( ) } }
2525
2626typealias xmlChar = UInt8
2727typealias xmlDocPtr = UnsafeMutablePointer < xmlDoc >
@@ -58,6 +58,8 @@ func test() {
5858 let _ = xmlReadFile ( remoteCharPtr, nil , 0 ) // NO XXE: external entities not enabled
5959 let _ = xmlReadFile ( remoteCharPtr, nil , Int32 ( XML_PARSE_NOENT . rawValue) ) // $ hasXXE=57
6060 let _ = xmlReadFile ( remoteCharPtr, nil , Int32 ( XML_PARSE_DTDLOAD . rawValue) ) // $ hasXXE=57
61+ let _ = xmlReadFile ( remoteCharPtr, nil , Int32 ( XML_PARSE_NOENT . rawValue | XML_PARSE_DTDLOAD . rawValue) ) // $ hasXXE=57
62+ let _ = xmlReadFile ( remoteCharPtr, nil , Int32 ( XML_PARSE_NOENT . rawValue | 0 ) ) // $ hasXXE=57
6163 let _ = xmlReadDoc ( remotePtr, nil , nil , 0 ) // NO XXE: external entities not enabled
6264 let _ = xmlReadDoc ( remotePtr, nil , nil , Int32 ( XML_PARSE_NOENT . rawValue) ) // $ hasXXE=56
6365 let _ = xmlReadDoc ( remotePtr, nil , nil , Int32 ( XML_PARSE_DTDLOAD . rawValue) ) // $ hasXXE=56
0 commit comments