forked from kyonshi/grenzland-mud
Fix error in "last all" command and several -Wunused-result compiler errors (#55)
* Add build generated files to .gitignore * Fix error in "last all" output and resolve Wunused-result warnings - Check return value of several standard library calls that could return error states. - Fix issue with "last all" command (it sent tabs for alignment that were reinterpreted as colors). * Fix buffer overflow in do_export_zone command
This commit is contained in:
@@ -366,13 +366,13 @@ ACMD(do_export_zone)
|
||||
f = fix_filename(zone_name);
|
||||
|
||||
/* Remove the old copy. */
|
||||
snprintf(sysbuf, MAX_STRING_LENGTH, "rm %s%s.tar.gz", path, f);
|
||||
snprintf(sysbuf, MAX_INPUT_LENGTH, "rm %s%s.tar.gz", path, f);
|
||||
|
||||
/* Tar the new copy. */
|
||||
snprintf(sysbuf, MAX_STRING_LENGTH, "tar -cf %s%s.tar %sqq.info %sqq.wld %sqq.zon %sqq.mob %sqq.obj %sqq.trg %sqq.shp", path, f, path, path, path, path, path, path, path);
|
||||
snprintf(sysbuf, MAX_INPUT_LENGTH, "tar -cf %s%s.tar %sqq.info %sqq.wld %sqq.zon %sqq.mob %sqq.obj %sqq.trg %sqq.shp", path, f, path, path, path, path, path, path, path);
|
||||
|
||||
/* Gzip it. */
|
||||
snprintf(sysbuf, MAX_STRING_LENGTH, "gzip %s%s.tar", path, f);
|
||||
snprintf(sysbuf, MAX_INPUT_LENGTH, "gzip %s%s.tar", path, f);
|
||||
|
||||
send_to_char(ch, "Files tar'ed to \"%s%s.tar.gz\"\r\n", path, f);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user