Port-sparc64 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [PATCH] ofwboot bootp/bootparams mixup
In article <49FEC7F2.1070708%marples.name@localhost>,
> }
>- if (tag == TAG_ROOTPATH) {
>+ if (tag == TAG_ROOTPATH && size <= sizeof(rootpath)) {
> strncpy(rootpath, (char *)cp, sizeof(rootpath));
> rootpath[size] = '\0';
> }
>- if (tag == TAG_HOSTNAME) {
>+ if (tag == TAG_HOSTNAME && size <= sizeof(hostname)) {
> strncpy(hostname, (char *)cp, sizeof(hostname));
> hostname[size] = '\0';
The <= test should really be < I think. Also why the printf changes...
I don't mind them, but others might.
christos
Home |
Main Index |
Thread Index |
Old Index