wok-6.x view util-linux/stuff/fix-findmnt.patch @ rev 12480

Up: util-linux (2.21.1) no longer util-linux-ng
author Christophe Lincoln <pankso@slitaz.org>
date Mon Apr 23 16:19:05 2012 +0200 (2012-04-23)
parents util-linux-ng/stuff/fix-findmnt.patch@cb53e0d30346
children
line source
1 commit a6c90fe597944f68fe49f45f1d8bc0d2e35104d4
2 Author: Petr Uzel <petr.uzel-aRb0bU7PRFPrBKCeMvbIDA@public.gmane.org>
3 Date: Sun Jul 4 20:02:57 2010 +0200
5 libmount: fix merge_optstr (do not truncate 3 trailing characters)
7 I believe this is the correct fix.
9 Signed-off-by: Petr Uzel <petr.uzel-aRb0bU7PRFPrBKCeMvbIDA@public.gmane.org>
11 diff --git a/shlibs/mount/src/tab_parse.c b/shlibs/mount/src/tab_parse.c
12 index 5dbcfa6..680e1fc 100644
13 --- a/shlibs/mount/src/tab_parse.c
14 +++ b/shlibs/mount/src/tab_parse.c
15 @@ -254,7 +254,8 @@ static char *merge_optstr(const char *vfs, const char *fs)
16 if (!strcmp(vfs, fs))
17 return strdup(vfs); /* e.g. "aaa" and "aaa" */
19 - sz = strlen(vfs) + strlen(fs) + 2;
20 + /* leave space for leading "r[ow],", "," and trailing zero */
21 + sz = strlen(vfs) + strlen(fs) + 5;
22 res = malloc(sz);
23 if (!res)
24 return NULL;