forked from osmocom/wireshark
BER: Fix segmentation fault when configuring new OIDs
Program terminated with signal 11, Segmentation fault. #0 0x00007f573e5bdecf in uat_fld_chk_oid (u1=0x2eb1830, strptr=0x7f573c8431e4 "", len=0, u2=0x0, u3=0x0, err=0x7ffee1668748) at uat.c:494 494 if(strptr[len-1] == '.') { (gdb) (gdb) bt #0 0x00007f573e5bdecf in uat_fld_chk_oid (u1=0x2eb1830, strptr=0x7f573c8431e4 "", len=0, u2=0x0, u3=0x0, err=0x7ffee1668748) at uat.c:494 #1 0x0000000000485dfc in uat_dlg_cb (win=0x3844290, user_data=0x3632bc0) at uat_gui.c:364 #2 0x00007f573b2f19a7 in _g_closure_invoke_va (closure=0x3367130, return_value=0x0, instance=0x3844290, args=0x7ffee1668a78, n_params=0, Change-Id: Ic61480f8c1f2cd833c58de0b2acc24dcb831578f Reviewed-on: https://code.wireshark.org/review/16800 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
parent
3c47d97412
commit
bf123efe15
|
@ -485,6 +485,11 @@ gboolean uat_fld_chk_oid(void* u1 _U_, const char* strptr, guint len, const void
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (len == 0) {
|
||||
*err = g_strdup("Empty OID");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for(i = 0; i < len; i++)
|
||||
if(!(g_ascii_isdigit(strptr[i]) || strptr[i] == '.')) {
|
||||
*err = g_strdup("Only digits [0-9] and \".\" allowed in an OID");
|
||||
|
|
Loading…
Reference in New Issue