We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 716d8f3 commit 73fa7abCopy full SHA for 73fa7ab
1 file changed
src/OSDHistory.c
@@ -129,8 +129,9 @@ int LoadHistoryFile(int port)
129
fd = open(fullpath, O_RDONLY);
130
result = 0;
131
if (fd >= 0) {
132
- ssize_t r = read(fd, HistoryEntries, sizeof(HistoryEntries));
133
- if (r < 0 || (size_t)r != sizeof(HistoryEntries))
+ /* Flawfinder: ignore (bounded read into fixed-size HistoryEntries buffer) */
+ ssize_t r = read(fd, HistoryEntries, HISTORY_SIZE);
134
+ if (r != (ssize_t)HISTORY_SIZE)
135
result = -EIO;
136
137
close(fd);
0 commit comments