bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #59601] buffer over-read on malformed environment variable


From: Dmitry Goncharov
Subject: [bug #59601] buffer over-read on malformed environment variable
Date: Sat, 5 Dec 2020 09:29:53 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #2, bug #59601 (project make):

Thanks for your report. Here is a patch.

diff --git a/src/main.c b/src/main.c
index 9066513..64e2529 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1364,7 +1364,7 @@ main (int argc, char **argv, char **envp)
         enum variable_export export = v_export;
         size_t len;
 
-        while (! STOP_SET (*ep, MAP_EQUALS))
+        while (! STOP_SET (*ep, MAP_EQUALS|MAP_NUL))
           ++ep;
 
         /* If there's no equals sign it's a malformed environment.  Ignore. 
*/


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59601>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]