]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_utilities/lib/debugging_internal.cpp
Security-59754.80.3.tar.gz
[apple/security.git] / OSX / libsecurity_utilities / lib / debugging_internal.cpp
index 55c74a7cd1a281bac2e031f36ab94e87a64b653f..c95c802eebd8cd26ca70857c6f6ebf0bcba69120 100644 (file)
@@ -218,9 +218,11 @@ void Target::message(const char *scope, const char *format, va_list args)
                // now stuff the message body in, slightly roasted
                size_t left = buffer + sizeof(buffer) - bufp - 1;       // reserve one
                size_t written = vsnprintf(bufp, left, format, args);
-        for (char *p = bufp; *p; p++)
-            if (!isprint(*p))
+        for (char *p = bufp; *p; p++) {
+            if (!isprint(*p)) {
                 *p = '?';
+            }
+        }
                if (written >= left) {  // snprintf overflowed
                        bufp += left;
                        strcpy(bufp - 3, "...");