OSDN Git Service

FORTIFY_SOURCE: fix up previous commit
authorNick Kralevich <nnk@google.com>
Wed, 5 Dec 2012 23:26:54 +0000 (15:26 -0800)
committerNick Kralevich <nnk@google.com>
Wed, 5 Dec 2012 23:26:54 +0000 (15:26 -0800)
I forgot two files in 326ea5413d18ea019cd1bda415ce428f7bdcafd2.

Change-Id: I30430f65bfafad4274193fc5b973959eac0791a7

libc/bionic/open.c
libc/bionic/openat.c

index 56602db..be4f04b 100644 (file)
@@ -53,9 +53,7 @@ int open(const char *pathname, int flags, ...)
 
 int __open_2(const char *pathname, int flags) {
     if (flags & O_CREAT) {
-        __libc_android_log_print(ANDROID_LOG_FATAL, "libc",
-            "*** open(O_CREAT) called without specifying a mode ***\n");
-        abort();
+        __fortify_chk_fail("open(O_CREAT) called without specifying a mode", 0);
     }
 
     flags |= O_LARGEFILE;
index fb04e9c..c1abbaa 100644 (file)
@@ -54,9 +54,7 @@ int openat(int fd, const char *pathname, int flags, ...)
 int __openat_2(int fd, const char *pathname, int flags)
 {
     if (flags & O_CREAT) {
-        __libc_android_log_print(ANDROID_LOG_FATAL, "libc",
-            "*** openat(O_CREAT) called without specifying a mode ***\n");
-        abort();
+        __fortify_chk_fail("openat(O_CREAT) called without specifying a mode", 0);
     }
 
     flags |= O_LARGEFILE;