Change in libosmocore[master]: osmo_sock_get_name_*: Ensure string is returned in error case

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri May 10 12:10:53 UTC 2019


Hello Jenkins Builder, 

I'd like you to reexamine a change. Please visit

    https://gerrit.osmocom.org/13960

to look at the new patch set (#3).

Change subject: osmo_sock_get_name_*: Ensure string is returned in error case
......................................................................

osmo_sock_get_name_*: Ensure string is returned in error case

osmo_sock_get_name_buf():
In case the getsockname() call is failing for some weird reason,
we shouldn't return an uninitialized, non-zero-terminated string
buffer to the caller, as most callers will be too lazy to test the
return value.

This holds even more true for users of the internal
osmo_sock_get_name2() and osmo_sock_get_name2_c() functions which indeed
very much ignore the return value of osmo_sock_get_name_buf().

Change-Id: I2d56327e96b7a6783cca38b828c5ee74aed776ae
---
M src/socket.c
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/13960/3
-- 
To view, visit https://gerrit.osmocom.org/13960
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2d56327e96b7a6783cca38b828c5ee74aed776ae
Gerrit-Change-Number: 13960
Gerrit-PatchSet: 3
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-CC: Mykola Shchetinin <mykola at pentonet.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190510/31ebd9fe/attachment.html>


More information about the gerrit-log mailing list