#148 closed defect (fixed)
Crash when resolving bad hostnames in Linux (thanks Binu KS)
Reported by: | bennylp | Owned by: | bennylp |
---|---|---|---|
Priority: | normal | Milestone: | release-0.5.10.2 |
Component: | pjlib | Version: | 0.5.10.1 |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: |
Description
Binu K S reported:
PJSIP crashes in Linux when it tries to resolve a bad address. The problem is in pjlib/src/pj/addr_resolv_sock.c in the following lines:
he = gethostbyname(copy); if (!he) { return pj_get_netos_error(); }
The gethostbyname call does not set any error code in errno in case of failures. The error is set in h_errno instead.
Change History (3)
comment:1 Changed 18 years ago by bennylp
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 18 years ago by bennylp
This actually has been fixed in http://www.pjsip.org/trac/changeset/722, but it was invalidated by http://www.pjsip.org/trac/changeset/907.
comment:3 Changed 18 years ago by bennylp
r1028:
Added test in pjlib-test to capture this error.
Note: See
TracTickets for help on using
tickets.
Fixed in r1022.