[patch] various bugs and strncpy abuse followup
Tito
farmatito at tiscali.it
Wed Jun 7 00:12:56 PDT 2006
On Wednesday 7 June 2006 00:34, Erik Hovland wrote:
> After the very helpful feedback and the continual searching for bugs, I
> have expanded my patch associated to various bugs all over busybox.
>
> This patchset has gotten bigger. So I have taken to splitting them up by
> file and annotating them in patch. I hope that is useful. Let me know if
> there is some way I can make this easier to go over or help with
> acceptance.
>
> Feel free to address each patch seperately in responding. I would not be
> surprised at all if I accidentally introduced regressions. I have not
> yet tried running the unit testing. But I have attempted to understand
> why each bug is a bug and addressed it according to its severity.
>
> I appreciate any attention you might give this work.
>
Hi, please shorten the error message.
BUG: Does not check return value of ioctl
FIX: Add a check and bail if it fails.
Index: console-tools/loadkmap.c
===================================================================
--- console-tools/loadkmap.c (revision 15298)
+++ console-tools/loadkmap.c (working copy)
@@ -70,7 +70,8 @@
ke.kb_index = j;
ke.kb_table = i;
ke.kb_value = ibuff[j];
- ioctl(fd, KDSKBENT, &ke);
+ if (ioctl(fd, KDSKBENT, &ke) < 0)
+ bb_error_msg("failed attempting to load key index %d in keymap %d", j, i);
-------> bb_perror_msg("KDSKBENT");
}
}
}
Ciao,
Tito
More information about the busybox
mailing list