summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
76c5dd1)
Author: noodles
Date: 2003/02/12 22:50:31
Handle unknown length packet stream data more gracefully.
break;
case 3:
fprintf(stderr, "Unsupported length type 3.\n");
break;
case 3:
fprintf(stderr, "Unsupported length type 3.\n");
+ curpacket->packet->length = 0;
+ curpacket->packet->data = NULL;
+ rc = -1;
- curpacket->packet->data =
- malloc(curpacket->packet->length *
+
+ if (rc == 0) {
+ curpacket->packet->data =
+ malloc(curpacket->packet->length *
- rc = getchar_func(ctx, curpacket->packet->length,
+ rc = getchar_func(ctx,
+ curpacket->packet->length,
curpacket->packet->data);
curpacket->packet->data);
inpacket = false;
} else {
fprintf(stderr, "Unexpected character: 0x%X\n",
inpacket = false;
} else {
fprintf(stderr, "Unexpected character: 0x%X\n",