iraf-v216 · Code · Issues (50) · Pull requests (81)
iraf.net pull request #124
Use strncpy and snprintf to fill file header in wtar
olebole merged 1 commit to iraf-community/iraf
olebole commented on 2017-12-13
This is required at least for the size
and mtime
fields (which are both defined as char[12]
: sprintf()
writes 12 chars, plus the closing '\0'
, which would give 13 chars into fields with the length of 12. To avoid this, we limit the max number of chars to the field size; the '\0'
is not needed here anyway.
Commits
- Use strncpy and snprintf to fill file header. [3822b1ae]
Last updated on 2017-12-13