nubus: Avoid array underflow and overflow
Check array indices. Avoid sprintf. Use buffers of sufficient size. Use appropriate types for array length parameters. Tested-by: Stan Johnson <userm57@yahoo.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:

committed by
Geert Uytterhoeven

parent
955999c902
commit
2f828fb21d
@@ -126,10 +126,8 @@ int nubus_rewinddir(struct nubus_dir* dir);
|
||||
/* Things to do with directory entries */
|
||||
int nubus_get_subdir(const struct nubus_dirent* ent,
|
||||
struct nubus_dir* dir);
|
||||
void nubus_get_rsrc_mem(void* dest,
|
||||
const struct nubus_dirent *dirent,
|
||||
int len);
|
||||
void nubus_get_rsrc_str(void* dest,
|
||||
const struct nubus_dirent *dirent,
|
||||
int maxlen);
|
||||
void nubus_get_rsrc_mem(void *dest, const struct nubus_dirent *dirent,
|
||||
unsigned int len);
|
||||
void nubus_get_rsrc_str(char *dest, const struct nubus_dirent *dirent,
|
||||
unsigned int maxlen);
|
||||
#endif /* LINUX_NUBUS_H */
|
||||
|
Reference in New Issue
Block a user