Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: [Ethereal-dev] Possible problem in packet-socks.c [negative length tvb_memcpy()]

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

From: Yaniv Kaul <ykaul@xxxxxxxxxxxx>
Date: Thu, 08 Apr 2004 16:56:20 +0200
Just from reading the code, it seems there's a potential problem of copying a negative sized buffer in display_string(), and specifically, in:

   int length = tvb_get_guint8(tvb, offset);

   tvb_memcpy(tvb, (guint8 *)temp, offset+1, length);