diff options
author | Robert Alm <robert2.alm@sonymobile.com> | 2014-11-25 13:28:11 +0100 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-11-27 11:01:50 -0800 |
commit | 3638a83657d9833816e579778394a40ae4178868 (patch) | |
tree | adb015f81103dc8eefe956c7e085c58d89fa1861 /libc/stdio/stdio_ext.cpp | |
parent | 461403270593363dfe0b75db9f5e9f454b4258d2 (diff) |
Add error-check when mapping socket to fd
The call to fdopen can fail in several ways.
The fprintf on the next line will then dereference a
NULL-pointer FILE*.
Added a NULL-check, closed the socket, returned system error
and added a comment about it.
Change-Id: I7a6b26aa3c79452b1fdd76af12dfa75da88cbad7
Diffstat (limited to 'libc/stdio/stdio_ext.cpp')
0 files changed, 0 insertions, 0 deletions