about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2004-03-03 18:47:52 +0000
committerWayne Davison <wayned@users.sourceforge.net>2004-03-03 18:47:52 +0000
commit326fb2d4834c68f3dea7cefa3a02dbbb2de4bbbf (patch)
tree4ab849c50a542ed5d717eff273f08f6903d81d77 /Src
parent3c04f95a333abf98379ca2ef30a29fe50c37ad7a (diff)
downloadzsh-326fb2d4834c68f3dea7cefa3a02dbbb2de4bbbf.tar.gz
zsh-326fb2d4834c68f3dea7cefa3a02dbbb2de4bbbf.tar.xz
zsh-326fb2d4834c68f3dea7cefa3a02dbbb2de4bbbf.zip
Fixed two cases where unmetify() was using an int* to store a value
into a size_t variable.
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/zle_params.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/Src/Zle/zle_params.c b/Src/Zle/zle_params.c
index 4eb2d455b..2c3b2c007 100644
--- a/Src/Zle/zle_params.c
+++ b/Src/Zle/zle_params.c
@@ -365,7 +365,9 @@ set_cutbuffer(Param pm, char *x)
 	free(cutbuf.buf);
     cutbuf.flags = 0;
     if (x) {
-	unmetafy(x, (int *)&cutbuf.len);
+	int n;
+	unmetafy(x, &n);
+	cutbuf.len = n;
 	cutbuf.buf = zalloc(cutbuf.len);
 	memcpy((char *)cutbuf.buf, x, cutbuf.len);
 	free(x);
@@ -418,9 +420,10 @@ set_killring(Param pm, char **x)
 	kringsize = arrlen(x);
 	kring = (Cutbuffer)zshcalloc(kringsize * sizeof(struct cutbuffer));
 	for (p = x; *p; p++) {
-	    int len = strlen(*p);
+	    int n, len = strlen(*p);
 	    kptr = kring + kpos;
-	    unmetafy(*p, (int *)&kptr->len);
+	    unmetafy(*p, &n);
+	    kptr->len = n;
 	    kptr->buf = (char *)zalloc(kptr->len);
 	    memcpy(kptr->buf, *p, kptr->len);
 	    zfree(*p, len+1);