I don't understand; envargs() returns void.
And having no environment vars is not an error condition.

There is an inconsistency between the way envargs() is defined
and the way it's declared in zip/unzip/unzpriv.h
and called in zip/unzip/unzip.c,
which assume there's a return value.
The best thing is probably to change the call to match the definition.

-- David

On 13-May-2014 4:26 AM, Gianfranco Costamagna wrote:
Hi boinc developers, a little patch for fix debian bug #747964

git diff
diff --git a/zip/zip/util.c b/zip/zip/util.c
index 73317da..33f02e0 100644
--- a/zip/zip/util.c
+++ b/zip/zip/util.c
@@ -825,7 +825,7 @@ void envargs(Pargc, Pargv, envstr, envstr2)
              while (isspace((uch)*envptr))
                  envptr++;
      if (envptr == NULL || *envptr == '\0')
-        return;
+        return PK_ERR;

      /* count the args so we can allocate room for them */
      argc = count_args(envptr);
@@ -902,6 +902,7 @@ void envargs(Pargc, Pargv, envstr, envstr2)
      /* save the values and return */
      *Pargv = argvect;
      *Pargc = argc;
+    return PK_OK;
  }

unzip.c checks for the return value of this function, but the function doesn't 
return any.

This can be a serious bug.

I'm not sure about the first line, PK_ERR but the patch should be fine.

thanks

cheers,



Gianfranco
_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to