Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH 17/17: check widthp before deref (is this okay, or should it be *swidep = buf + *widthp ? *widthp : 0; or something)
- X-seq: zsh-workers 34109
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH 17/17: check widthp before deref (is this okay, or should it be *swidep = buf + *widthp ? *widthp : 0; or something)
- Date: Tue, 6 Jan 2015 06:25:49 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=tR/0Z0Cq9kWipdtM4SoQrpaCbkYeAW1nrKf1CuZN3r4=; b=M39FM6lGSfmibwt/pnax8VnrbTyFojux1wsSPuEZ1IbYL5yKOG5h9GDvU4NOd+sa0i XXw4CDEZbZvLvwP1zG1wVS+wPVLgdcvJ/ELX4gd2rT7OFKvyGcqdzKzsxdEndu7S11Ia r6qlONPuw+zOygsG9v0bdoLry6A1/3bvxWSu5l2zCJekGz+G9mIi7806BiB96SYl08w8 LIiaNQR/u3bcN/En55TUhVMRmJb3kDoGeO9Peur1hZCgjUd/F/m0Z5i0XMAsLDJ4BjHV L2tqs7S3uZyfV/6zumrSA7dk9AwUViiIGUw7oZsTb7BV11+Fd3rsCKV6ymyMdk+D9uCw YI/g==
- In-reply-to: <1420521949-30483-1-git-send-email-mikachu@gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1420521949-30483-1-git-send-email-mikachu@gmail.com>
---
Src/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Src/utils.c b/Src/utils.c
index 72a0c9c..c10fb11 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -565,7 +565,7 @@ wcs_nicechar(wchar_t c, size_t *widthp, char **swidep)
*swidep = buf + strlen(buf);
return buf;
}
- if (swidep)
+ if (swidep && widthp)
*swidep = buf + *widthp;
return buf;
}
--
2.2.0.GIT
Messages sorted by:
Reverse Date,
Date,
Thread,
Author