-
Notifications
You must be signed in to change notification settings - Fork 0
Missing return value in parse_cookies() #8
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
parse_cookies() is declared as returning int but has no return statement. This is undefined behavior per C89.
Affected Files
src/httpshen.c:46
Details
static int parse_cookies(HTTPC *httpc, const UCHAR *in) {
/* ... processing ... */
free(buf);
/* no return statement */
}The caller receives whatever value happens to be in the return register.
Fix
Add return 0; at the end (or appropriate error handling).
Severity
HIGH — undefined behavior, compiler may generate unexpected code.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working