diff options
author | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-24 20:07:53 +0000 |
---|---|---|
committer | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-24 20:07:53 +0000 |
commit | 5f6791666943fb22e36717050383414136e5e9fc (patch) | |
tree | b08c7d78b608217b85f1ead81f892c9f9354c39a /base | |
parent | e8a9a7472f544a839cbc47b8279d3ce99b0cf0a0 (diff) | |
download | chromium_src-5f6791666943fb22e36717050383414136e5e9fc.zip chromium_src-5f6791666943fb22e36717050383414136e5e9fc.tar.gz chromium_src-5f6791666943fb22e36717050383414136e5e9fc.tar.bz2 |
Linux: fix a process name setting bug that doesn't currently affect us.
We don't pass a format string starting with '-' to setproctitle(), but I was looking at doing that and found this small bug.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/218033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27114 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/setproctitle_linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/base/setproctitle_linux.c b/base/setproctitle_linux.c index 205be2b..3544d3e 100644 --- a/base/setproctitle_linux.c +++ b/base/setproctitle_linux.c @@ -91,7 +91,7 @@ void setproctitle(const char* fmt, ...) { memset(g_main_argv[0], 0, avail_size); va_start(ap, fmt); if (fmt[0] == '-') { - vsnprintf(g_main_argv[0], avail_size, fmt, ap); + vsnprintf(g_main_argv[0], avail_size, &fmt[1], ap); } else { size_t size = snprintf(g_main_argv[0], avail_size, "%s ", g_orig_argv0); if (size < avail_size) |