From f76575ef8e011bc8ab94a058b9f2a778983474b9 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Apr 16 2021 22:13:50 +0000 Subject: Apply patch autofs-5.1.5-fix-hesiod-string-check-in-master_parse.patch patch_name: autofs-5.1.5-fix-hesiod-string-check-in-master_parse.patch present_in_specfile: true --- diff --git a/CHANGELOG b/CHANGELOG index f374706..9c988c1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -37,6 +37,7 @@ xx/xx/2018 autofs-5.1.5 - fix incorrect locking in sss lookup. - fix amd parser opts option handling. - better handle hesiod support not built in. +- fix hesiod string check in master_parse(). 19/12/2017 autofs-5.1.4 - fix spec file url. diff --git a/lib/master_parse.y b/lib/master_parse.y index 9aa5732..e40c1ba 100644 --- a/lib/master_parse.y +++ b/lib/master_parse.y @@ -172,8 +172,8 @@ line: if ((tmp = strchr($2, ','))) *tmp++ = '\0'; #ifndef WITH_HESIOD - /* Map type or or map type parser is hesiod */ - if (!strcmp($2, "hesiod") || !strcmp(tmp, "hesiod")) { + /* Map type or map type parser is hesiod */ + if (!strcmp($2, "hesiod") || (tmp && !strcmp(tmp, "hesiod"))) { master_error("hesiod support not built in"); local_free_vars(); YYABORT; @@ -360,8 +360,8 @@ map: PATH if ((tmp = strchr($1, ','))) *tmp++ = '\0'; #ifndef WITH_HESIOD - /* Map type or or map type parser is hesiod */ - if (!strcmp($1, "hesiod") || !strcmp(tmp, "hesiod")) { + /* Map type or map type parser is hesiod */ + if (!strcmp($1, "hesiod") || (tmp && !strcmp(tmp, "hesiod"))) { master_error("hesiod support not built in"); local_free_vars(); YYABORT;