lib/utils_base.c: if asprintf fails, string is undefined (#1278)
waja
notifications at github.com
Wed Jul 30 14:52:44 CEST 2014
if asprintf fails, string content becomes invalid. we need
to check if it ran OK by checking the returned value.
in case of fail, asprintf returns -1, otherwise the number
of writen bytes is returned.
also, on ubuntu 13.10 i've receiving a lot of warnings:
"warning: ignoring return value of ‘asprintf’"
this patches fixes some of them
Signed-off-by: Ricardo Maraschini <ricardo.maraschini at gmail.com>
---
Closes #1227
You can merge this Pull Request by running:
git pull https://github.com/waja/monitoring-plugins github1227
Or you can view, comment on it, or merge it online at:
https://github.com/monitoring-plugins/monitoring-plugins/pull/1278
-- Commit Summary --
* lib/utils_base.c: if asprintf fails, string is undefined
-- File Changes --
M lib/utils_base.c (15)
-- Patch Links --
https://github.com/monitoring-plugins/monitoring-plugins/pull/1278.patch
https://github.com/monitoring-plugins/monitoring-plugins/pull/1278.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/monitoring-plugins/monitoring-plugins/pull/1278
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20140730/6fd9c094/attachment.html>
More information about the Devel
mailing list