Changeset 722


Ignore:
Timestamp:
Apr 6, 2006, 3:11:12 PM (15 years ago)
Author:
Sam Hocevar
Message:
  • Check the magic bytes at the end of the buffer when cucul_load()ing it.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cucul/cucul.c

    r719 r722  
    9595
    9696    if(size != 12 + width * height * 5 + 4)
     97        return NULL;
     98
     99    if(buf[size - 4] != 'A' || buf[size - 3] != 'C'
     100        || buf[size - 2] != 'A' || buf[size - 1] != 'C')
    97101        return NULL;
    98102
Note: See TracChangeset for help on using the changeset viewer.