diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2016-05-17 09:55:13 +0200 |
---|---|---|
committer | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2016-05-18 20:56:33 +0000 |
commit | 90891602fc826d11985910fc8e892706cd419539 (patch) | |
tree | 4900746825559f2eccabd56820fbe8cb26750bb4 /sal/osl | |
parent | 77eaa0e4f3727a06a03a0c92b83e9fe2f6a2efb1 (diff) |
limit scanf string field width
Change-Id: I9070bae914d923171b6eaf8209de00922dc87be7
Reviewed-on: https://gerrit.libreoffice.org/25052
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'sal/osl')
-rw-r--r-- | sal/osl/unx/process.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index 391b1604a79a..4d372a3eb3d0 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -899,7 +899,7 @@ bool osl_getProcStat(pid_t pid, struct osl_procStat* procstat) "%lu %li %li %li" "%lu %lu %li %lu" "%lu %lu %lu %lu %lu" - "%s %s %s %s" + "%23s %23s %23s %23s" "%lu %lu %lu", &procstat->state, &procstat->ppid, &procstat->pgrp, &procstat->session, &procstat->tty, &procstat->tpgid, @@ -975,7 +975,7 @@ bool osl_getProcStatus(pid_t pid, struct osl_procStat* procstat) tmp = strstr(prstatusbuf,"SigPnd:"); if(tmp) { - sscanf(tmp, "SigPnd: %s SigBlk: %s SigIgn: %s %*s %s", + sscanf(tmp, "SigPnd: %23s SigBlk: %23s SigIgn: %23s %*s %23s", procstat->signal, procstat->blocked, procstat->sigignore, procstat->sigcatch ); } |