View Issue Details

IDProjectCategoryView StatusLast Update
0000374fileGeneralpublic2022-08-06 15:53
Reporterpiru Assigned To 
Status newResolutionopen 
Product Version5.42 
Summary0000374: Endless busyloop in file_mbswidth
Descriptionfile_mbswidth contains an endless bysyloop in the non-widechar version.

The bug is in the while loop:

    while (*s) {
        width += (ms->flags & MAGIC_RAW) != 0
            || isprint(CAST(unsigned char, *s)) ? 1 : 4;


Note that variable `s' is not incremented at all. Fix is easy, add s++; to the loop.
Steps To Reproduce1. Build file for system without widechar support
2. file anyfile
Additional InformationThis bug was added by commit
TagsNo tags attached.


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2022-08-06 15:53 piru New Issue