|
[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()
On Fri, 2015-07-03 at 16:29 +0100, Ian Jackson wrote:
> 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.
Perhaps a smaller yakk would be to just include the numeric errno? For
such a rare error case having to worry about two layers of nested error
handling seems annoying...
Ian
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |