From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Description of problem: I just tried to compile package mc-4_6_0-5 from Fedora. The compiler said 1. direntry.c(626): warning #175: subscript out of range The source code is dir.dent.d_name[MC_MAXPATHLEN] = 0; Suggest dir.dent.d_name[ MC_MAXPATHLEN - 1] = 0; might be better code. 2. extfs.c(892): warning #175: subscript out of range The source code is dir.dent.d_name[MC_MAXPATHLEN] = 0; Same problem as above. Version-Release number of selected component (if applicable): mc-4_6_0-5 How reproducible: Always Steps to Reproduce: 1. by inspection 2. 3. Additional info:
This looks fine in current CVS version.
This might be fine in current CVS, but should be fixed if an update is released. EASYFIX
Created attachment 99008 [details] Patch to correct range
Why didn't this fix end up in the latest erratum? This is an easy fix with an attached patch.
Please add this patch before releasing the next update!
There is a fix for this already in the jumbo patch: +++ mc-4.6.0/vfs/direntry.c 2004-04-05 12:20:09.000000000 +0200 - strncpy(dir.dent.d_name, info->cur->name, MC_MAXPATHLEN); - dir.dent.d_name[MC_MAXPATHLEN] = 0; + g_strlcpy(dir.dent.d_name, info->cur->name, MC_MAXPATHLEN); +++ mc-4.6.0/vfs/extfs.c I guess I should close it, so I won't think this issue is still unresolved ;) .