From 90891602fc826d11985910fc8e892706cd419539 Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Tue, 17 May 2016 09:55:13 +0200 Subject: limit scanf string field width Change-Id: I9070bae914d923171b6eaf8209de00922dc87be7 Reviewed-on: https://gerrit.libreoffice.org/25052 Tested-by: Jenkins Reviewed-by: Jochen Nitschke --- sal/osl/unx/process.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sal/osl/unx/process.cxx') 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 ); } -- cgit