Bug 8486

Summary: networking/httpd.c - invalid operands to binary expression
Product: Busybox Reporter: larissanadja
Component: OtherAssignee: unassigned
Status: RESOLVED DUPLICATE    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS   
Host: Target:
Build:

Description larissanadja 2015-11-28 13:07:53 UTC
By analyzing the BusyBox source code, our tool points to possible inconsistencies that we would like to check with you.

Package: busybox
Commit: a6ed6a3
File: networking/httpd.c
 
Problem description: We found a code snippet where a binary operation may have invalid operands ('int' and 'char *'). We think this case might throw compilation errors when the macro ENABLE_FEATURE_HTTPD_BASIC_AUTH is enabled.

Code line: 1880

Code snippet:
remoteuser = xstrndup(user_and_passwd,

strchrnul(user_and_passwd, ':') - user_and_passwd

);


 
Thanks in advance.
Comment 1 Mike Frysinger 2015-12-02 19:31:40 UTC

*** This bug has been marked as a duplicate of bug 8481 ***