diff mbox

[uclibc-ng-devel] uClibc-ng - small C library for embedded systems branch master updated. v1.0.17-3-gc61570a

Message ID 20160812053117.1844A10113@helium.openadk.org
State Not Applicable
Headers show

Commit Message

wbx Aug. 12, 2016, 5:31 a.m. UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".

The branch, master has been updated
       via  c61570ac32f052e050c46838ea5ab60de5836f8e (commit)
      from  bbd7151f7980c7d075fe652331f01d3aadc73e42 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c61570ac32f052e050c46838ea5ab60de5836f8e
Author: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Date:   Tue Aug 9 18:48:47 2016 +0200

    librt: fix path parsing in __spawni()
    
    __spawni() loops forever when parsing the path variable due to incorrect
    pointer update. This patch fixes the issue.
    
    Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>

-----------------------------------------------------------------------

Summary of changes:
 librt/spawn.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



hooks/post-receive
diff mbox

Patch

diff --git a/librt/spawn.c b/librt/spawn.c
index 79f5b06..25e3994 100644
--- a/librt/spawn.c
+++ b/librt/spawn.c
@@ -203,9 +203,10 @@  __spawni(pid_t *pid, const char *file,
 		*--name = '/';
 	}
 
-	char *p;
+	char *p = (char *)path;
 	do {
 		char *startp;
+		path = p;
 		p = strchrnul(path, ':');
 
 		/* Two adjacent colons, or a colon at the beginning or the end
@@ -233,7 +234,6 @@  __spawni(pid_t *pid, const char *file,
 			goto error;
 		}
 
-		path = p;
 	} while (*p++ != '\0');
 
 error: