Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145758666
D10441.id27587.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
604 B
Referenced Files
None
Subscribers
None
D10441.id27587.diff
View Options
Index: contrib/elftoolchain/elfcopy/main.c
===================================================================
--- contrib/elftoolchain/elfcopy/main.c
+++ contrib/elftoolchain/elfcopy/main.c
@@ -1285,8 +1285,9 @@
err(EXIT_FAILURE, "can not open %s", fn);
if ((data = malloc(sb.st_size + 1)) == NULL)
err(EXIT_FAILURE, "malloc failed");
- if (fread(data, 1, sb.st_size, fp) == 0 || ferror(fp))
- err(EXIT_FAILURE, "fread failed");
+ if (sb.st_size > 0)
+ if (fread(data, 1, sb.st_size, fp) != (size_t)sb.st_size)
+ err(EXIT_FAILURE, "fread failed");
fclose(fp);
data[sb.st_size] = '\0';
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Feb 25, 2:12 AM (3 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28981951
Default Alt Text
D10441.id27587.diff (604 B)
Attached To
Mode
D10441: elfcopy: allow empty symbol list files
Attached
Detach File
Event Timeline
Log In to Comment