fix #868: don't assert but simply ignore values that don't have the proper size
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 10 Apr 2006 01:34:23 +0000 (01:34 +0000)
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 10 Apr 2006 01:34:23 +0000 (01:34 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17845 f5534014-38df-0310-8fa8-9805f1628bb7

capture_wpcap_packet.c

index 61ed96a4e86c0892940abb5cc468290018793a4a..1b132b95adeac019988df466f4c54dcd0f2ef05b 100644 (file)
@@ -270,8 +270,7 @@ wpcap_packet_request_uint(void *adapter, ULONG Oid, UINT *value)
 
 
     Status = wpcap_packet_request(adapter, Oid, FALSE /* !set */, (char *) value, &length);
-    if(Status) {
-        g_assert(length == sizeof(UINT));
+    if(Status && length == sizeof(UINT)) {
         return 1;
     } else {
         return 0;
@@ -288,8 +287,7 @@ wpcap_packet_request_ulong(void *adapter, ULONG Oid, ULONG *value)
 
 
     Status = wpcap_packet_request(adapter, Oid, FALSE /* !set */, (char *) value, &length);
-    if(Status) {
-        g_assert(length == sizeof(ULONG));
+    if(Status && length == sizeof(ULONG)) {
         return 1;
     } else {
         return 0;