2019-06-30 | Paul Boddie | raw files shortlog changelog graph | Obtain transferred strings/names safely. | |
fs.cc (file) |
1.1 --- a/fs.cc Sat Jun 29 16:45:39 2019 +0200 1.2 +++ b/fs.cc Sun Jun 30 00:43:32 2019 +0200 1.3 @@ -211,7 +211,13 @@ 1.4 1.5 /* Obtain the object's path. */ 1.6 1.7 - char *path = (char *) fsobj.buffer; 1.8 + char *path = fsdesc_get_name(&fsobj); 1.9 + 1.10 + if (path == NULL) 1.11 + { 1.12 + ipc_message_send_error(msg, -L4_EINVAL); 1.13 + return; 1.14 + } 1.15 1.16 /* Find the object. If it cannot be located, return an error. */ 1.17