Group :: Monitoring
RPM: acct
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: acct-rh-ub.patch
Download
Download
--- acct/file_rd.c
+++ acct/file_rd.c
@@ -118,6 +118,10 @@ char *file_reader_get_entry(struct file_rd_info *fri)
? max_recs
: fri->buffered_records);
+ /* Prevent UB when incomplete record appears */
+ if (recs_to_read==0)
+ goto no_more_records;
+
/* Move back in the file */
(void)fseek(fri->fp, -fri->record_size * recs_to_read,