httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45689] New: Bad parameter for sizeof() in apr_os_strerror()
Date Mon, 25 Aug 2008 20:16:28 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45689

           Summary: Bad parameter for sizeof() in apr_os_strerror()
           Product: Apache httpd-2
           Version: 2.2.9
          Platform: PC
        OS/Version: OS/2
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: Core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: apache@datahack.se


In the function apr_os_strerror in srclib/apr/misc/unix/errorcodes.c (code
imported from apache 1.x; see report #45688) a
overflow check is done between len and the size of result. If len is bigger
than sizeof(buf), it's decreased to "sizeof(buf-1)" - this looks like a typo
and should probably be "sizeof(buf)-1".

164: if (len >= sizeof(result))
165:  len = sizeof(result-1);

should probably be

164: if (len >= sizeof(result))
165:  len = sizeof(result)-1;

I haven't/can't "confirmed" this bug, but it sure looks like one to me :)


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

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


Mime
View raw message