View Issue Details

IDProjectCategoryView StatusLast Update
0000472LDMud 3.3Implementationpublic2008-07-26 12:18
Reporterfufu Assigned Tofufu  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Summary0000472: say(), tell_room(), printf() and tell_object() efuns truncate output on \0
DescriptionFor example, printf("a\00morestuff") results in just a being sent. write() is fine -- the output is amorestuff. As far as I can see, the \0 is filtered because it's not in my telnet's character set.
Additional InformationIn fact, printf() goes through tell_object() for printing stuff; the attached patch fixes tell_object(), tell_room() and say().
TagsNo tags attached.
Attached Files
fmt_string.patch (558 bytes)   
commit d6b3ee6cd9a47e755c028b3074262ab77fac5e3c
Author: Bertram Felgenhauer <int-e@gmx.de>
Date:   Wed Jul 9 18:48:09 2008 +0200

    second cut at #472

diff --git a/src/object.c b/src/object.c
index 9a355fe..26d8d06 100644
--- a/src/object.c
+++ b/src/object.c
@@ -1291,7 +1291,7 @@ tell_object (object_t *ob, string_t *str)
     {
         save_command_giver = command_giver;
         command_giver = ob;
-        add_message("%s", get_txt(str));
+        add_message(FMT_STRING, str);
         command_giver = save_command_giver;
         return;
     }
fmt_string.patch (558 bytes)   

Relationships

related to 0000471 resolvedfufu use tell_object_str() function in e_say() and e_tell_room() 

Activities

zesstra

2008-07-08 16:13

administrator   ~0000691

Mhmm, the patch seems to be OK for me.

Gnomi

2008-07-09 08:28

manager   ~0000702

For me, too.

fufu

2008-07-09 10:51

manager   ~0000706

This is trivial with the new patch for 0000471.

fufu

2008-07-26 12:18

manager   ~0000752

fixed in commit 2396

Issue History

Date Modified Username Field Change
2006-06-05 10:29 fufu New Issue
2006-06-05 10:29 fufu File Added: fmt_string.diff
2008-07-02 02:34 fufu Status new => assigned
2008-07-02 02:34 fufu Assigned To => fufu
2008-07-08 16:13 zesstra Note Added: 0000691
2008-07-09 01:45 zesstra Relationship added related to 0000471
2008-07-09 08:28 Gnomi Note Added: 0000702
2008-07-09 10:50 fufu File Added: fmt_string.patch
2008-07-09 10:51 fufu Note Added: 0000706
2008-07-09 10:52 fufu File Deleted: fmt_string.diff
2008-07-26 12:18 fufu Status assigned => resolved
2008-07-26 12:18 fufu Resolution open => fixed
2008-07-26 12:18 fufu Note Added: 0000752