summaryrefslogtreecommitdiff
path: root/include/linux/nubus.h
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2018-01-13 17:37:13 -0500
committerGeert Uytterhoeven <geert@linux-m68k.org>2018-01-16 16:47:29 +0100
commit2f828fb21df42058084b16d5e07cecdc30dbc3a5 (patch)
treee4dd00df654ccc5b3119ea6b93ef94f326daf1c0 /include/linux/nubus.h
parent955999c9023290da18230b57df1f04187a43a4c0 (diff)
downloadlwn-2f828fb21df42058084b16d5e07cecdc30dbc3a5.tar.gz
lwn-2f828fb21df42058084b16d5e07cecdc30dbc3a5.zip
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>
Diffstat (limited to 'include/linux/nubus.h')
-rw-r--r--include/linux/nubus.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/linux/nubus.h b/include/linux/nubus.h
index 11ce6b1117a8..d8d63370a28c 100644
--- a/include/linux/nubus.h
+++ b/include/linux/nubus.h
@@ -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 */