Just subtract one byte off the strncpy destination size and the null
byte will always fit.
Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
db->images[i]->width = width;
db->images[i]->height = height;
strncpy(db->images[i]->timestart, timestart,
db->images[i]->width = width;
db->images[i]->height = height;
strncpy(db->images[i]->timestart, timestart,
- sizeof(db->images[i]->timestart));
+ sizeof(db->images[i]->timestart) - 1);
strncpy(db->images[i]->timeend, timeend,
strncpy(db->images[i]->timeend, timeend,
- sizeof(db->images[i]->timeend));
+ sizeof(db->images[i]->timeend) - 1);
strncpy(db->images[i]->imageformat, imageformat,
strncpy(db->images[i]->imageformat, imageformat,
- sizeof(db->images[i]->imageformat));
+ sizeof(db->images[i]->imageformat) - 1);
db->images[i]->options = options;
db->images[i]->text_lead = text_lead;
db->images[i]->text = text;
db->images[i]->options = options;
db->images[i]->text_lead = text_lead;
db->images[i]->text = text;