You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@apr.apache.org by bu...@apache.org on 2007/09/07 13:39:40 UTC

DO NOT REPLY [Bug 43326] New: - apr_strtoi64(const char *nptr, char **endptr, int base)

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43326>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43326

           Summary: apr_strtoi64(const char *nptr, char **endptr, int base)
           Product: APR
           Version: 1.2.8
          Platform: All
        OS/Version: FreeBSD
            Status: NEW
          Severity: critical
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: nucleusv@gmail.com


apr_strtoi64(const char *nptr, char **endptr, int base) fails when ntpr=NULL

must check if NULL
before 
s = nptr;
    do {
         >>> s= NULL, goes wrong address and fails !!! 
	c = *s++;
    } while (apr_isspace(c));

because the apr_atoi64() calls apr_strtoi64(), it fails too

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


DO NOT REPLY [Bug 43326] - apr_strtoi64(const char *nptr, char **endptr, int base)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43326>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43326


bojan@rexursive.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Additional Comments From bojan@rexursive.com  2007-09-09 16:27 -------
APR calls normally don't check for NULL values, but segfault instead. It is the
responsibility of the caller to check for NULL values.

Also, similar libc functions segfault on NULL as well. For instance, this program:
--------------------------------
#include <stdio.h>
#include <stdlib.h>

int main(int argc,char **argv){
  long a;

  a=strtol(argv[1],NULL,10);

  printf("%ld\n",a);

  return 0;
}
--------------------------------

Produces the following output:
--------------------------------
$ ./main 33
33

$ ./main
Segmentation fault
--------------------------------

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org