projects
/
adu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
de525e7
)
Fix parse_uid_arg().
author
Andre Noll
<maan@systemlinux.org>
Sat, 1 Nov 2008 19:22:09 +0000
(20:22 +0100)
committer
Andre Noll
<maan@systemlinux.org>
Sat, 1 Nov 2008 19:22:09 +0000
(20:22 +0100)
The old code could segfault if an invalid --user argument was given.
string.c
patch
|
blob
|
history
diff --git
a/string.c
b/string.c
index 8d1a738b5865fa9d414fe9f2ec7ec05df67700bd..2825cdca798d7366277768c522cfdc62ff5d315a 100644
(file)
--- a/
string.c
+++ b/
string.c
@@
-318,10
+318,12
@@
int parse_uid_arg(const char *orig_arg, struct uid_range **ur)
if (ret < 0)
break;
}
+ free(argv);
free(arg);
if (ret < 0) {
free(*ur);
*ur = NULL;
+ return ret;
}
/* an empty range indicates the end of the list */
(*ur)[n].low = 1;