diff options
author | Ken Raeburn <raeburn@mit.edu> | 2007-07-12 23:33:25 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2007-07-12 23:33:25 +0000 |
commit | 52571d9201c7bef4dc5ebdf14a41db1f7baddc8e (patch) | |
tree | 9f108e05e8881ea19954b4959fdca96d47daa615 /src/lib/krb4/klog.c | |
parent | 57913ccc175061dd41e98914d50eda56dd9685c0 (diff) | |
download | krb5-52571d9201c7bef4dc5ebdf14a41db1f7baddc8e.tar.gz krb5-52571d9201c7bef4dc5ebdf14a41db1f7baddc8e.tar.xz krb5-52571d9201c7bef4dc5ebdf14a41db1f7baddc8e.zip |
Avoid use of unchecked sprintf in libraries. Use asprintf if the
output buffer is allocated according to the size of data to be
written, or snprintf otherwise.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19703 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb4/klog.c')
-rw-r--r-- | src/lib/krb4/klog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/krb4/klog.c b/src/lib/krb4/klog.c index da48efeb2c..4e9661a891 100644 --- a/src/lib/krb4/klog.c +++ b/src/lib/krb4/klog.c @@ -91,7 +91,7 @@ char * klog(type,format,a1,a2,a3,a4,a5,a6,a7,a8,a9,a0) logtype_array[L_ERR_UNK] = 1; } - (void) sprintf(logtxt,format,a1,a2,a3,a4,a5,a6,a7,a8,a9,a0); + (void) snprintf(logtxt,sizeof(logtxt),format,a1,a2,a3,a4,a5,a6,a7,a8,a9,a0); if (!logtype_array[type]) return(logtxt); |