mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
This is a security audit change of the main source.
It removed all ocurrences of the following functions :
sprintf
strcpy
strcat
The replacements are slprintf, safe_strcpy and safe_strcat.
It should not be possible to use code in Samba that uses
sprintf, strcpy or strcat, only the safe_equivalents.
Once Andrew has fixed the slprintf implementation then
this code will be moved back to the 1.9.18 code stream.
Jeremy.
(This used to be commit 2d77445400
)
This commit is contained in:
@ -486,7 +486,7 @@ char *timestring(void )
|
||||
int zone = TimeDiff(t);
|
||||
int absZoneMinutes = (zone<0 ? -zone : zone) / 60;
|
||||
size_t len = strftime(TimeBuf,sizeof(TimeBuf)-6,"%Y/%m/%d %T",tm);
|
||||
sprintf(TimeBuf+len," %c%02d%02d",
|
||||
slprintf(TimeBuf+len, sizeof(fstring) - len - 1, " %c%02d%02d",
|
||||
zone<0?'+':'-',absZoneMinutes/60,absZoneMinutes%60);
|
||||
}
|
||||
#else
|
||||
|
Reference in New Issue
Block a user