mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
net/9p/client.c: version pointer uninitialized
The p9_client_version() does not initialize the version pointer. If the call to p9pdu_readf() returns an error and version has not been allocated in p9pdu_readf(), then the program will jump to the "error" label and will try to free the version pointer. If version is not initialized, free() will be called with uninitialized, garbage data and will provoke a crash. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Tomas Bortoli <[email protected]> Reported-by: [email protected] Reviewed-by: Jun Piao <[email protected]> Reviewed-by: Yiwen Jiang <[email protected]> Cc: Eric Van Hensbergen <[email protected]> Cc: Ron Minnich <[email protected]> Cc: Latchesar Ionkov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Cc: [email protected] Signed-off-by: Dominique Martinet <[email protected]>
This commit is contained in:
parent
6baaac0961
commit
7913690dcc
1 changed files with 1 additions and 1 deletions
|
|
@ -958,7 +958,7 @@ static int p9_client_version(struct p9_client *c)
|
|||
{
|
||||
int err = 0;
|
||||
struct p9_req_t *req;
|
||||
char *version;
|
||||
char *version = NULL;
|
||||
int msize;
|
||||
|
||||
p9_debug(P9_DEBUG_9P, ">>> TVERSION msize %d protocol %d\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue