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

Wireshark-bugs: [Wireshark-bugs] [Bug 1512] Acces to uninitialized memory in packet-smpp

Date: Wed, 11 Apr 2007 03:47:23 +0000 (GMT)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1512


jeff.morriss@xxxxxxxxxxx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Comment #2 from jeff.morriss@xxxxxxxxxxx  2007-04-11 03:47 GMT -------
I think a simpler fix would be:

@@ -867,7 +869,7 @@
     nstime_t    tmptime;

     strval = (char *) tvb_get_ephemeral_stringz(tvb, *offset, &len);
-    if (*strval)
+    if (*strval && len >= 16)
     {
        if (smpp_mktime(strval, &tmptime.secs, &tmptime.nsecs))
            proto_tree_add_time(tree, field_R, tvb, *offset, len, &tmptime);

non?

I don't have a sample capture to test that against, though.  Could you attach
one or test this fix?


-- 
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.