Changeset 1ea8566 in mainline
- Timestamp:
 - 2024-12-18T16:47:06Z (11 months ago)
 - Children:
 - fc632e8
 - Parents:
 - 01ccd702
 - File:
 - 
      
- 1 edited
 
- 
          
  uspace/app/pcapcat/main.c (modified) (2 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
uspace/app/pcapcat/main.c
r01ccd702 r1ea8566 29 29 #include <stdint.h> 30 30 #include <stdio.h> 31 #include <stdlib.h> 31 32 #include <time.h> 32 33 #include <stdbool.h> … … 84 85 } 85 86 printf("0x%x: %d, %d\n", hdr.magic_stamp, hdr.captured_length, hdr.original_length); 86 87 fread( NULL, 1, (size_t)hdr.captured_length, f);88 printf("After\n");87 void *data = malloc(hdr.captured_length); 88 fread(data, 1, (size_t)hdr.captured_length, f); 89 free(data); 89 90 read_bytes = fread(&hdr, 1, sizeof(pcap_packet_header_t), f); 90 91 }  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  