Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150035682
D26693.id77926.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
525 B
Referenced Files
None
Subscribers
None
D26693.id77926.diff
View Options
Index: head/usr.bin/backlight/backlight.c
===================================================================
--- head/usr.bin/backlight/backlight.c
+++ head/usr.bin/backlight/backlight.c
@@ -145,7 +145,8 @@
if (argc == 1) {
/* ignore a trailing % for user friendlyness */
- if (argv[0][strlen(argv[0]) - 1] == '%')
+ if (strlen(argv[0]) > 0 &&
+ argv[0][strlen(argv[0]) - 1] == '%')
argv[0][strlen(argv[0]) - 1] = '\0';
percent = strtonum(argv[0], 0, 100, &percent_error);
if (percent_error)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 29, 9:53 PM (15 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30556934
Default Alt Text
D26693.id77926.diff (525 B)
Attached To
Mode
D26693: backlight: test lenght of argv before trying to trim '%'
Attached
Detach File
Event Timeline
Log In to Comment