lkml.org 
[lkml]   [1996]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectPatch for repquota.c (quota-utils), fixes segmentation fault.

Starting with kernel somewhere 1.3.[56789]x i started to get segmentation
faults in repquota (when running "repquota -a"). The patch is below.

(if someone wants the patch to get 1.51 to compile (problems with include-files
and #defines), mail me. This patch alone doesn't make quota-utils 1.51
compile..).

*** quota-1.51-fixed/repquota.c Sun Mar 17 20:26:07 1996
--- repquota.c Mon May 6 23:45:46 1996
***************
*** 288,294 ****
if (id > highid[type])
highid[type] = id;
if (name) {
! memcpy(fup->fu_name, name, 10);
} else {
sprintf(fup->fu_name, "%u", id);
}
--- 288,295 ----
if (id > highid[type])
highid[type] = id;
if (name) {
! strncpy(fup->fu_name, name, 10);
! fup->fu_name[10] = '\0';
} else {
sprintf(fup->fu_name, "%u", id);
}

// JaS


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.023 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site