OSDN Git Service

who_nameを初期化していないためにkillerにstrcpyした時にバッファオーバーする事があったのでwho_nameをヌル文字列で初期化するように修正。
authorhabu <habu@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 2 Sep 2002 22:59:43 +0000 (22:59 +0000)
committerhabu <habu@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 2 Sep 2002 22:59:43 +0000 (22:59 +0000)
src/spells1.c

index 56588ea..95396c7 100644 (file)
@@ -8275,6 +8275,9 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int mons
        /* Attacker's name (prepared before polymorph)*/
        char who_name[80];
 
+       /* Initialize by null string */
+       who_name[0] = '\0';
+
        rakubadam_p = 0;
        rakubadam_m = 0;