Changeset ba0f22b in git


Ignore:
Timestamp:
15/01/14 06:00:01 (6 years ago)
Author:
Olly Betts <olly@…>
Branches:
line_contents, master, stereo, travis-osx
Children:
3d3fb6c
Parents:
bca9107
Message:

src/img.c: Pass pimg->buf_len rather than literal 257.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    rbca9107 rba0f22b  
     1Wed Jan 15 05:58:31 GMT 2014  Olly Betts <olly@survex.com>
     2
     3        * src/img.c: Pass pimg->buf_len rather than literal 257.
     4
    15Wed Jan 15 00:23:34 GMT 2014  Olly Betts <olly@survex.com>
    26
  • src/img.c

    rbca9107 rba0f22b  
    16721672      }
    16731673      if (ch != '\\') ungetc(ch, pimg->fh);
    1674       fgets(pimg->label_buf, 257, pimg->fh);
     1674      fgets(pimg->label_buf, pimg->buf_len, pimg->fh);
    16751675      if (feof(pimg->fh)) {
    16761676         img_errno = IMG_BADFORMAT;
     
    17421742         pimg->flags = (int)opt & 0x3f;
    17431743         result = img_LABEL;
    1744          if (!fgets(pimg->label_buf, 257, pimg->fh)) {
     1744         if (!fgets(pimg->label_buf, pimg->buf_len, pimg->fh)) {
    17451745            img_errno = feof(pimg->fh) ? IMG_BADFORMAT : IMG_READERROR;
    17461746            return img_BAD;
Note: See TracChangeset for help on using the changeset viewer.