From: Todd C. Miller Date: Mon, 28 May 2018 14:30:57 +0000 (-0600) Subject: Quiet a clang analyzer warning. It should not be possible for X-Git-Tag: SUDO_1_8_24^2~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ad2290a27b13194970c68efbf1b95333b0f5892;p=sudo Quiet a clang analyzer warning. It should not be possible for pop_include() to be called when YY_CURRENT_BUFFER is NULL. --- diff --git a/plugins/sudoers/toke.c b/plugins/sudoers/toke.c index 991954c30..3274df8cf 100644 --- a/plugins/sudoers/toke.c +++ b/plugins/sudoers/toke.c @@ -4531,7 +4531,7 @@ pop_include(void) FILE *fp; debug_decl(pop_include, SUDOERS_DEBUG_PARSER) - if (idepth == 0) + if (idepth == 0 || YY_CURRENT_BUFFER == NULL) debug_return_bool(false); if (!keepopen) diff --git a/plugins/sudoers/toke.l b/plugins/sudoers/toke.l index 79e659afb..fc0e78cf6 100644 --- a/plugins/sudoers/toke.l +++ b/plugins/sudoers/toke.l @@ -1033,7 +1033,7 @@ pop_include(void) FILE *fp; debug_decl(pop_include, SUDOERS_DEBUG_PARSER) - if (idepth == 0) + if (idepth == 0 || YY_CURRENT_BUFFER == NULL) debug_return_bool(false); if (!keepopen)