Просмотр исходного кода

Fix an error test on the result of mmap syscall

The Macro IS_ERR should not be used to test the result value of address type.
Gary 6 лет назад
Родитель
Сommit
0ca3acb9dc
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Pal/src/security/Linux/main.c

+ 1 - 1
Pal/src/security/Linux/main.c

@@ -300,7 +300,7 @@ static int load_static (const char * filename, void ** load_addr,
     base = INLINE_SYSCALL(mmap, 6, NULL, maplength, c->prot,
                           MAP_PRIVATE | MAP_FILE, fd, c->mapoff);
 
-    if (IS_ERR(base)) {
+    if (IS_ERR_P(base)) {
         ret = -ERRNO_P(base);
         goto out;
     }