[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Info-mtools] Regression with mdir compared with 4.0.20
From: |
Hamish Coleman |
Subject: |
[Info-mtools] Regression with mdir compared with 4.0.20 |
Date: |
Mon, 3 Dec 2018 13:06:50 +1100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi,
One of my users reported an issue[1] which we tracked down to the
version of mtools that he was using.
[1] https://github.com/hamishcoleman/thinkpad-ec/issues/103
The steps I used to show the issue are outlined below and I have attached
the patch I made to revert one of the changes and restore to the same
results as 4.0.20. However, after a quick look at the other changes
included in 4.0.21, I am unsure if this is the right fix - I think that
this particular len var is already counting codepoints and thus does
not need to be multiplied, but I did not exhaustively check it.
Thanks,
Hamish.
To demonstrate the issue and also check the results of patching:
First, download test file:
https://download.lenovo.com/pccbbs/mobiles/g1uj45us.iso
Check this command before and after the patch
- mdir -i g1uj45us.iso.orig@@71680 -/ -b
Without this patch, the mdir shows the file 206a7.hsh is in the
directory ::/FLASH/
With both patched and unpatched versions:
We can see that this directory does not contain that file:
- mdir -i g1uj45us.iso.orig@@71680 /FLASH/
We can also see that the correct directory contains that file:
- mdir -i g1uj45us.iso.orig@@71680 /FLASH/G1ETB8WW/
---
charsetConv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/charsetConv.c b/charsetConv.c
index f2dece30520b..379f8999574f 100644
--- a/charsetConv.c
+++ b/charsetConv.c
@@ -368,7 +368,7 @@ int wchar_to_native(const wchar_t *wchar, char *native,
size_t len)
int r;
initialize_to_native();
len = wcsnlen(wchar,len);
- r=safe_iconv(to_native, wchar, native, len*4, &mangled);
+ r=safe_iconv(to_native, wchar, native, len, &mangled);
native[r]='\0';
return r;
#else
--
Use Linux! address@hidden
*********************************** O- ***********************************
``... why haven't you indolent fleshers transformed the whole galaxy
into chocolate?''
``Give us time.''
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Info-mtools] Regression with mdir compared with 4.0.20,
Hamish Coleman <=