diff --git a/src/interfaces/ecpg/test/sql/binary.pgc b/src/interfaces/ecpg/test/sql/binary.pgc
index a86aa283b6..3b2f4f68e8 100644
--- a/src/interfaces/ecpg/test/sql/binary.pgc
+++ b/src/interfaces/ecpg/test/sql/binary.pgc
@@ -59,6 +59,7 @@ main (void)
 
   printf ("name=%s, accs=%d byte=%s\n", empl.name, empl.accs, empl.byte);
 
+  memset(empl.name, 0, 21L);
   EXEC SQL DECLARE B BINARY CURSOR FOR select name, accs, byte from empl where idnum =:empl.idnum;
   EXEC SQL OPEN B;
   EXEC SQL FETCH B INTO :empl.name,:empl.accs,:empl.byte;