/[qemu]/qemu/block-cow.c
ViewVC logotype

Diff of /qemu/block-cow.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by bellard, Sun Apr 10 14:39:05 2005 UTC revision 1.5 by bellard, Thu Apr 28 21:09:32 2005 UTC
# Line 54  static int cow_probe(const uint8_t *buf, Line 54  static int cow_probe(const uint8_t *buf,
54  {  {
55      const struct cow_header_v2 *cow_header = (const void *)buf;      const struct cow_header_v2 *cow_header = (const void *)buf;
56    
57      if (be32_to_cpu(cow_header->magic) == COW_MAGIC &&      if (buf_size >= sizeof(struct cow_header_v2) &&
58            be32_to_cpu(cow_header->magic) == COW_MAGIC &&
59          be32_to_cpu(cow_header->version) == COW_VERSION)          be32_to_cpu(cow_header->version) == COW_VERSION)
60          return 100;          return 100;
61      else      else

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26