|
Mantis - Resin
|
|||||
| Viewing Issue Advanced Details | |||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 5632 | major | always | 01-14-14 08:45 | 09-08-14 17:08 | |
|
|
|||||
| Reporter: | bean | Platform: | |||
| Assigned To: | ferg | OS: | |||
| Priority: | normal | OS Version: | |||
| Status: | closed | Product Version: | 4.0.38 | ||
| Product Build: | Resolution: | fixed | |||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | 4.0.41 | ||
|
|
|||||
| Summary: | 0005632: calculate_poll_result() returns uninitialized value | ||||
| Description: |
In std.c, calculate_poll_result() is supposed to return an int value. But it has a path that doesn't return anything. In that case, the caller gets a bogus return value. This is especially dangerous as this becomes the return value from std_read() |
||||
| Steps To Reproduce: | |||||
| Additional Information: |
--------------------- Here is the bad method: --------------------- static int calculate_poll_result(connection_t *conn, int poll_result) { if (poll_result == 0) { return TIMEOUT_EXN; } else if (poll_result < 0 && errno != EINTR) { return read_exception_status(conn, errno); } /* missing return here */ } |
||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|
|
|||||
|
|
||||