ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: Re: [Ethereal-dev] Re: [Coverity] Possible Format String Vulnerabilites

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Thu, 17 Mar 2005 01:11:39 -0800
Gilbert Ramirez wrote:
Are you sure you want to use g_assert. I think it would be better for
the dissector to record that packet as having an error by throwing an
exception, rather than having ethereal abort on bad data. Otherwise,
it would be easy for a packet to be created that would crash Ethereal.

Yup. I changed it to cast "length" to a "guint", and removed the g_assert() - but even that shouldn't be necessary, at least as I read the C89 standard, as per my other mail. (I don't think it should even throw an exception, as I don't think a length of 255 is invalid there.)