|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 7/7] libxc: Prevent NULL pointer dereference in stdiostream_vmessage()
Jennifer Herbert writes ("[Xen-devel] [PATCH 7/7] libxc: Prevent NULL pointer
dereference in stdiostream_vmessage()"):
> Unlikely that it may seem localtime_r could fail, which would result in a
> null pointer dereference. In this case, one can simply just skip logging the
> date/time, and logging anything is more useful then nothing.
I think it would be best, in this error case, to explicitly note that
date/time conversion failed, by printing (say) "[localtime_r failed:
<errno>]". Sadly that will involve calling strerror and doing
something sensible if strerror fails, too.
thanks,
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |