diff options
| author | Wayne Davison <wayned@samba.org> | 2006-10-13 23:46:32 +0000 |
|---|---|---|
| committer | Wayne Davison <wayned@samba.org> | 2006-10-13 23:46:32 +0000 |
| commit | 83078af5b0b1db4eb185cb256ebb76c117eea110 (patch) | |
| tree | 42a4a8040cdc7cb9883064e1548d6f7565e639d4 /util.c | |
| parent | 185aa5b0e5f5ffd4d5ca442bdff113aba501f19b (diff) | |
| download | android_external_rsync-83078af5b0b1db4eb185cb256ebb76c117eea110.tar.gz android_external_rsync-83078af5b0b1db4eb185cb256ebb76c117eea110.tar.bz2 android_external_rsync-83078af5b0b1db4eb185cb256ebb76c117eea110.zip | |
Changed sprintf() calls to snprintf().
Diffstat (limited to 'util.c')
| -rw-r--r-- | util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -359,7 +359,7 @@ int robust_unlink(const char *fname) /* start where the last one left off to reduce chance of clashes */ start = counter; do { - sprintf(&path[pos], "%03d", counter); + snprintf(&path[pos], 4, "%03d", counter); if (++counter >= MAX_RENAMES) counter = 1; } while ((rc = access(path, 0)) == 0 && counter != start); @@ -1115,7 +1115,7 @@ char *human_num(int64 num) units = 'K'; } if (units) { - sprintf(bufs[n], "%.2f%c", dnum, units); + snprintf(bufs[n], sizeof bufs[0], "%.2f%c", dnum, units); return bufs[n]; } } |
