]> git.proxmox.com Git - systemd.git/blobdiff - src/basic/log.c
Imported Upstream version 231
[systemd.git] / src / basic / log.c
index 3ea643b6e6f84fe24abc57ca953d55f20e787c62..49b4598b7c851a9af8e9a2c7fd0454d1b7ca41ba 100644 (file)
@@ -334,7 +334,7 @@ static int write_to_console(
                 const char *object,
                 const char *buffer) {
 
-        char location[64], prefix[1 + DECIMAL_STR_MAX(int) + 2];
+        char location[256], prefix[1 + DECIMAL_STR_MAX(int) + 2];
         struct iovec iovec[6] = {};
         unsigned n = 0;
         bool highlight;
@@ -350,7 +350,7 @@ static int write_to_console(
         highlight = LOG_PRI(level) <= LOG_ERR && show_color;
 
         if (show_location) {
-                xsprintf(location, "(%s:%i) ", file, line);
+                snprintf(location, sizeof(location), "(%s:%i) ", file, line);
                 IOVEC_SET_STRING(iovec[n++], location);
         }