Lines Matching +full:multiple +full:- +full:amp
9 Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
11 Copyright (c) 2001-2003 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
12 Copyright (c) 2004-2009 Karl Waclawek <karl@waclawek.net>
13 Copyright (c) 2005-2007 Steven Solie <steven@solie.ca>
14 Copyright (c) 2016-2025 Sebastian Pipping <sebastian@pipping.org>
21 Copyright (c) 2022 Sean McBride <sean@rogue-research.com>
96 FILE *fp = ((XmlwfUserData *)userData)->fp; in characterData()
97 for (; len > 0; --len, ++s) { in characterData()
100 fputts(T("&"), fp); in characterData()
141 fputts(T("&"), fp); in attributeValue()
177 /* Lexicographically comparing UTF-8 encoded attribute values,
189 FILE *fp = ((XmlwfUserData *)userData)->fp; in startElement()
196 nAtts = (int)((p - atts) >> 1); in startElement()
210 FILE *fp = ((XmlwfUserData *)userData)->fp; in endElement()
224 return sep1 - sep2; in nsattcmp()
233 FILE *fp = ((XmlwfUserData *)userData)->fp; in startElementNS()
252 nAtts = (int)((p - atts) >> 1); in startElementNS()
276 FILE *fp = ((XmlwfUserData *)userData)->fp; in endElementNS()
294 FILE *fp = ((XmlwfUserData *)userData)->fp; in processingInstruction()
330 data->currentDoctypeName = xcsdup(doctypeName); in startDoctypeDecl()
335 NotationList *notationListHead = data->notationListHead; in freeNotations()
338 NotationList *next = notationListHead->next; in freeNotations()
339 free((void *)notationListHead->notationName); in freeNotations()
340 free((void *)notationListHead->systemId); in freeNotations()
341 free((void *)notationListHead->publicId); in freeNotations()
345 data->notationListHead = NULL; in freeNotations()
350 free((void *)userData->currentDoctypeName); in cleanupUserData()
351 userData->currentDoctypeName = NULL; in cleanupUserData()
359 return -1; in xcscmp()
366 return -1; in xcscmp()
377 return xcscmp(n1->notationName, n2->notationName); in notationCmp()
389 for (p = data->notationListHead; p != NULL; p = p->next) in endDoctypeDecl()
393 free((void *)data->currentDoctypeName); in endDoctypeDecl()
394 data->currentDoctypeName = NULL; in endDoctypeDecl()
405 for (p = data->notationListHead, i = 0; i < notationCount; p = p->next, i++) { in endDoctypeDecl()
411 fputts(T("<!DOCTYPE "), data->fp); in endDoctypeDecl()
412 fputts(data->currentDoctypeName, data->fp); in endDoctypeDecl()
413 fputts(T(" [\n"), data->fp); in endDoctypeDecl()
417 fputts(T("<!NOTATION "), data->fp); in endDoctypeDecl()
418 fputts(notations[i]->notationName, data->fp); in endDoctypeDecl()
419 if (notations[i]->publicId != NULL) { in endDoctypeDecl()
420 fputts(T(" PUBLIC '"), data->fp); in endDoctypeDecl()
421 fputts(notations[i]->publicId, data->fp); in endDoctypeDecl()
422 puttc(T('\''), data->fp); in endDoctypeDecl()
423 if (notations[i]->systemId != NULL) { in endDoctypeDecl()
424 puttc(T(' '), data->fp); in endDoctypeDecl()
425 puttc(T('\''), data->fp); in endDoctypeDecl()
426 fputts(notations[i]->systemId, data->fp); in endDoctypeDecl()
427 puttc(T('\''), data->fp); in endDoctypeDecl()
429 } else if (notations[i]->systemId != NULL) { in endDoctypeDecl()
430 fputts(T(" SYSTEM '"), data->fp); in endDoctypeDecl()
431 fputts(notations[i]->systemId, data->fp); in endDoctypeDecl()
432 puttc(T('\''), data->fp); in endDoctypeDecl()
434 puttc(T('>'), data->fp); in endDoctypeDecl()
435 puttc(T('\n'), data->fp); in endDoctypeDecl()
439 fputts(T("]>\n"), data->fp); in endDoctypeDecl()
443 free((void *)data->currentDoctypeName); in endDoctypeDecl()
444 data->currentDoctypeName = NULL; in endDoctypeDecl()
459 entry->notationName = xcsdup(notationName); in notationDecl()
460 if (entry->notationName == NULL) { in notationDecl()
466 entry->systemId = xcsdup(systemId); in notationDecl()
467 if (entry->systemId == NULL) { in notationDecl()
469 free((void *)entry->notationName); in notationDecl()
474 entry->systemId = NULL; in notationDecl()
477 entry->publicId = xcsdup(publicId); in notationDecl()
478 if (entry->publicId == NULL) { in notationDecl()
480 free((void *)entry->systemId); /* Safe if it's NULL */ in notationDecl()
481 free((void *)entry->notationName); in notationDecl()
486 entry->publicId = NULL; in notationDecl()
489 entry->next = data->notationListHead; in notationDecl()
490 data->notationListHead = entry; in notationDecl()
554 FILE *fp = ((XmlwfUserData *)XML_GetUserData((XML_Parser)userData))->fp; in markup()
555 for (; len > 0; --len, ++s) in markup()
562 FILE *fp = ((XmlwfUserData *)XML_GetUserData(parser))->fp; in metaLocation()
577 ((XmlwfUserData *)XML_GetUserData((XML_Parser)userData))->fp); in metaStartDocument()
583 ((XmlwfUserData *)XML_GetUserData((XML_Parser)userData))->fp); in metaEndDocument()
590 FILE *fp = data->fp; in metaStartElement()
623 FILE *fp = data->fp; in metaEndElement()
634 FILE *fp = usrData->fp; in metaProcessingInstruction()
646 FILE *fp = usrData->fp; in metaComment()
658 FILE *fp = data->fp; in metaStartCdataSection()
668 FILE *fp = data->fp; in metaEndCdataSection()
678 FILE *fp = data->fp; in metaCharacterData()
692 FILE *fp = data->fp; in metaStartDoctypeDecl()
705 FILE *fp = data->fp; in metaEndDoctypeDecl()
717 FILE *fp = data->fp; in metaNotationDecl()
738 FILE *fp = data->fp; in metaEntityDecl()
775 FILE *fp = data->fp; in metaStartNamespaceDecl()
791 FILE *fp = data->fp; in metaEndNamespaceDecl()
806 static const XML_Char prefixL[] = T("windows-"); in unknownEncoding()
807 static const XML_Char prefixU[] = T("WINDOWS-"); in unknownEncoding()
822 cp += (int)(s - digits); in unknownEncoding()
826 if (! codepageMap(cp, info->map)) in unknownEncoding()
828 info->convert = unknownEncodingConvert; in unknownEncoding()
831 info->release = free; in unknownEncoding()
832 info->data = malloc(sizeof(int)); in unknownEncoding()
833 if (! info->data) in unknownEncoding()
835 *(int *)info->data = cp; in unknownEncoding()
887 /* clang-format off */ in usage()
890 T(" %s -h|--help\n") in usage()
891 T(" %s -v|--version\n") in usage()
893 T("xmlwf - Determines if an XML document is well-formed\n") in usage()
899 T(" -s print an error if the document is not [s]tandalone\n") in usage()
900 T(" -n enable [n]amespace processing\n") in usage()
901 T(" -p enable processing of external DTDs and [p]arameter entities\n") in usage()
902 T(" -x enable processing of e[x]ternal entities\n") in usage()
903 T(" -e ENCODING override any in-document [e]ncoding declaration\n") in usage()
904 T(" -w enable support for [W]indows code pages\n") in usage()
905 T(" -r disable memory-mapping and use [r]ead calls instead\n") in usage()
906 …T(" -g BYTES buffer size to request per call pair to XML_[G]etBuffer and read (default: 8 K… in usage()
907 …T(" -k when processing multiple files, [k]eep processing after first file with error\… in usage()
910 T(" -d DIRECTORY output [d]estination directory\n") in usage()
911 T(" -c write a [c]opy of input XML, not canonical XML\n") in usage()
912 T(" -m write [m]eta XML, not canonical XML\n") in usage()
913 T(" -t write no XML output for [t]iming of plain parsing\n") in usage()
914 T(" -N enable adding doctype and [n]otation declarations\n") in usage()
917 …T(" NOTE: If you ever need to increase these values for non-attack payload, please file a bug rep… in usage()
919 T(" -a FACTOR set maximum tolerated [a]mplification factor (default: 100.0)\n") in usage()
920 … T(" -b BYTES set number of output [b]ytes needed to activate (default: 8 MiB/64 MiB)\n") in usage()
923 …T(" -q disable reparse deferral, and allow [q]uadratic parse runtime with large token… in usage()
926 T(" -h, --help show this [h]elp message and exit\n") in usage()
927 T(" -v, --version show program's [v]ersion number and exit\n") in usage()
940 …T(" 0 the input files are well-formed and the output (if requested) was written succ… in usage()
942 T(" 2 one or more input files were not well-formed\n") in usage()
944 T(" 4 command-line argument error\n") in usage()
947 T("Please report bugs at https://github.com/libexpat/libexpat/issues -- thank you!\n") in usage()
948 , /* clang-format on */ in usage()
986 float attackMaximumAmplification = -1.0f; /* signaling "not set" */ in tmain()
1006 if (argv[i][0] != T('-')) in tmain()
1008 if (argv[i][1] == T('-')) { in tmain()
1133 T(" (needs an integer from 0 to 2^64-1)")); in tmain()
1164 i--; in tmain()
1180 if (attackMaximumAmplification != -1.0f) { in tmain()
1194 (void)attackThresholdBytes; // silence -Wunused-but-set-variable in tmain()