X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Flexer%2Fformat-parser.c;h=b539432eb1d9b457773d80fca2803851cc254170;hb=efe067379890a29af2b4ad06bf83df7a2eb4d009;hp=b3ccba55ced7b4d559966817c438b878ce87a1f8;hpb=dcf9b154cbcaa35c3d8459a201b77eec8bcb30bd;p=pspp diff --git a/src/language/lexer/format-parser.c b/src/language/lexer/format-parser.c index b3ccba55ce..b539432eb1 100644 --- a/src/language/lexer/format-parser.c +++ b/src/language/lexer/format-parser.c @@ -18,15 +18,15 @@ 02110-1301, USA. */ #include -#include "format.h" +#include #include -#include "message.h" +#include #include -#include "message.h" +#include #include "lexer.h" -#include "misc.h" -#include "str.h" -#include "variable.h" +#include +#include +#include #include "gettext.h" #define _(msgid) gettext (msgid) @@ -128,6 +128,11 @@ parse_format_specifier (struct fmt_spec *input, enum fmt_parse_flags flags) ds_c_str (&tokstr)); return 0; } + if ( w > MAX_STRING ) + { + msg (SE, _("String variable width may not exceed %d"), MAX_STRING); + return 0; + } cp = cp2; if (f->n_args > 1 && *cp == '.')