[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

possible update for bsdmainutils



There is an outstanding bug (#254075) for bsdmainutils, which describes
a case where calendar(1) claims a file contains an invalid multibyte
sequence, even when it doesn't, on alpha (and maybe other platforms
where sizeof(int) != sizeof(size_t)).

The following patch fixes this:

Index: usr.bin/calendar/wcslib.c
===================================================================
--- usr.bin/calendar/wcslib.c	(revision 122)
+++ usr.bin/calendar/wcslib.c	(working copy)
@@ -99,7 +99,7 @@
 utf8towcs (wchar_t *out, char *in, size_t n)
 {
 	char *ip = in, *op = (char *) out;
-	int ibl = strlen(in), obl = n * sizeof(wchar_t);
+	size_t ibl = strlen(in), obl = n * sizeof(wchar_t);
 	static iconv_t cd = (iconv_t) -1;
 	int r;

Can this change be pushed to testing if I upload the package to
unstable?

-- 
gram



Reply to: