ソースを参照

qcacld-3.0: Buffer overflow while parsing setrmcrate command

There is a buffer overflow while using sscanf.
To resolve this, use sscanf according to buffer length.

Change-Id: Ida2444b42ef6b73ea6f55735166df941158a6e50
CRs-Fixed: 2059779
Ashish Kumar Dhanotiya 7 年 前
コミット
bfe639fc93
1 ファイル変更1 行追加1 行削除
  1. 1 1
      core/hdd/src/wlan_hdd_ioctl.c

+ 1 - 1
core/hdd/src/wlan_hdd_ioctl.c

@@ -316,7 +316,7 @@ static int hdd_parse_setrmcrate_command(uint8_t *pValue,
 	if ('\0' == *inPtr)
 		return 0;
 
-	v = sscanf(inPtr, "%32s ", buf);
+	v = sscanf(inPtr, "%31s ", buf);
 	if (1 != v)
 		return -EINVAL;