ubase

suckless linux base utils
git clone git://git.2f30.org/ubase.git
Log | Files | Refs | README | LICENSE

commit 3c47a9a9d677c067a8d96ef97818f01230520e1a
parent 5f4d18d4fa61448668560086e7f7ef02528bf92b
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri Apr  4 19:39:34 +0200

mount: rename bufsiz to datasiz for clarity

datasiz relates to the size of data

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
mount.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mount.c b/mount.c @@ -31,7 +31,7 @@ struct { }; static void -parseopts(char *popts, unsigned long *flags, char *data, size_t bufsiz) +parseopts(char *popts, unsigned long *flags, char *data, size_t datasiz) { unsigned int i, validopt; size_t optlen, dlen = 0; @@ -55,7 +55,7 @@ parseopts(char *popts, unsigned long *flags, char *data, size_t bufsiz) if(!validopt) { /* unknown option, pass as data option to mount() */ if((optlen = strlen(name))) { - if(dlen + optlen + 2 >= bufsiz) + if(dlen + optlen + 2 >= datasiz) return; /* prevent overflow */ if(dlen) data[dlen++] = ',';