]> The Tcpdump Group git mirrors - libpcap/commit
We can't longjmp out of sdup(), as it's called in the lexical analyzer.
authorGuy Harris <[email protected]>
Sun, 28 Oct 2018 22:19:41 +0000 (15:19 -0700)
committerGuy Harris <[email protected]>
Sun, 28 Oct 2018 22:19:41 +0000 (15:19 -0700)
commitdfafa1f9a39edfec9466079214b78c3b16dd6ea8
treea8206e117f5606c9edee51d234fdf051436985c1
parent12f7e1fb1a17d69fd941d168b84b2fe6d8d32a0d
We can't longjmp out of sdup(), as it's called in the lexical analyzer.

Instead, have sdup() just set the error message to "out of memory" and
return NULL if we run out of memory.  The lexical analyzer will just set
yylval.s to NULL; the parser then has to check for all sdup()ed tokens
and, if null, YYABORT the parse.

Credit to OSS-Fuzz for finding this issue.
gencode.c
grammar.y