Bug 8481 - networking/httpd.c - invalid operands to binary expression
Summary: networking/httpd.c - invalid operands to binary expression
Status: RESOLVED INVALID
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: Macintosh Mac OS
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
: 8486 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-11-28 13:04 UTC by larissanadja
Modified: 2016-01-03 22:20 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description larissanadja 2015-11-28 13:04:35 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

);
Comment 1 Mike Frysinger 2015-12-02 19:31:40 UTC
*** Bug 8486 has been marked as a duplicate of this bug. ***
Comment 2 Denys Vlasenko 2016-01-03 22:20:48 UTC
No, this code is not buggy.