• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/corennnnn


Commit MetaInfo

Revisãoe5d5a575676815c762b5954eac773a04066618ff (tree)
Hora2010-04-14 19:12:28
AutorXinyu Chen <xinyu.chen@free...>
CommiterChih-Wei Huang

Mensagem de Log

Fix bug of mmc.c not checking read_file result.
This bug causes segment fault when reading name node of
SDIO mmc device's /sys file, which is not existed at all.

Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>

Mudança Sumário

Diff

--- a/vold/mmc.c
+++ b/vold/mmc.c
@@ -158,6 +158,10 @@ static int mmc_bootstrap_card(char *sysfs_path)
158158
159159 sprintf(filename, "/sys%s/name", devpath);
160160 p = read_file(filename, &sz);
161+ if (!p) {
162+ LOGE("Unable to read MMC name: %s", filename);
163+ return -errno;
164+ }
161165 p[strlen(p) - 1] = '\0';
162166 sprintf(tmp, "MMC_NAME=%s", p);
163167 free(p);