summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dtrans/source/cnttype/wbench/testcnttype.cxx2
-rw-r--r--sal/osl/unx/process.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/dtrans/source/cnttype/wbench/testcnttype.cxx b/dtrans/source/cnttype/wbench/testcnttype.cxx
index f6482c2d6e03..b4cfb7a5c0d3 100644
--- a/dtrans/source/cnttype/wbench/testcnttype.cxx
+++ b/dtrans/source/cnttype/wbench/testcnttype.cxx
@@ -71,7 +71,7 @@ sal_Bool readCntTypesFromFileIntoVector( char* fname, vector< string >& vecData
fseek( fstream, 0L, SEEK_SET );
char line[1024];
- while ( fscanf( fstream, "%[^\n]s", line ) != EOF )
+ while ( fscanf( fstream, "%1023[^\n]s", line ) != EOF )
{
vecData.push_back( line );
fgetc( fstream );
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
);
}