Don't try and construct an OID string if the len is zero. Fixes

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9246

svn path=/trunk/; revision=52455
This commit is contained in:
Evan Huus 2013-10-08 21:12:06 +00:00
parent 0863791253
commit 69da562c83
1 changed files with 6 additions and 3 deletions

View File

@ -832,11 +832,14 @@ const char* oid_subid2string(guint32* subids, guint len) {
return rel_oid_subid2string(subids, len, TRUE);
}
const char* rel_oid_subid2string(guint32* subids, guint len, gboolean is_absolute) {
char* s = (char *)ep_alloc0(((len)*11)+1);
char* w = s;
char *s, *w;
if(!subids)
if(!subids || len == 0)
return "*** Empty OID ***";
s = (char *)ep_alloc0(((len)*11)+2);
w = s;
if (!is_absolute)
*w++ = '.';