mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-01 07:31:20 +02:00
36509: allocate hash table nodes with zshcalloc() to avoid garbage flag values
This commit is contained in:
parent
8b1676e3b7
commit
6ff0628182
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2015-09-12 Barton E. Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 36509: Src/Modules/curses.c: allocate hash table nodes with
|
||||||
|
zshcalloc() to avoid garbage flag values
|
||||||
|
|
||||||
2015-09-12 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
2015-09-12 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||||
|
|
||||||
* 36491: Src/glob.c, Test/D07multibyte.ztst: Multibyte
|
* 36491: Src/glob.c, Test/D07multibyte.ztst: Multibyte
|
||||||
|
|
|
@ -370,7 +370,7 @@ zcurses_colorget(const char *nam, char *colorpair)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cpn = (Colorpairnode)zalloc(sizeof(struct colorpairnode));
|
cpn = (Colorpairnode)zshcalloc(sizeof(struct colorpairnode));
|
||||||
|
|
||||||
if (!cpn) {
|
if (!cpn) {
|
||||||
zsfree(cp);
|
zsfree(cp);
|
||||||
|
@ -462,7 +462,7 @@ zccmd_init(const char *nam, char **args)
|
||||||
use_default_colors();
|
use_default_colors();
|
||||||
#endif
|
#endif
|
||||||
/* Initialise the default color pair, always 0 */
|
/* Initialise the default color pair, always 0 */
|
||||||
cpn = (Colorpairnode)zalloc(sizeof(struct colorpairnode));
|
cpn = (Colorpairnode)zshcalloc(sizeof(struct colorpairnode));
|
||||||
if (cpn) {
|
if (cpn) {
|
||||||
cpn->colorpair = 0;
|
cpn->colorpair = 0;
|
||||||
addhashnode(zcurses_colorpairs,
|
addhashnode(zcurses_colorpairs,
|
||||||
|
|
Loading…
Reference in a new issue