alpine 3.6
obsolete weakness #14

1

Weakness Breakdown


Definition:

An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

This C routine is considered obsolete.

File Name:

hylafax/src/hylafax-6.0.6/libhylafax/Sys.c++

Context:

The highlighted line of code below is the trigger point of this particular Alpine 3.6 obsolete weakness.

 #ifdef S_IFCHR
    return (Sys::stat(filename, sb) >= 0 && (sb.st_mode&S_IFMT) == S_IFCHR);
#else
    return (false);
#endif
}

bool
Sys::isCharSpecialFile(const char* filename)
{
    struct stat sb;
    return Sys::isCharSpecialFile(filename, sb);
}

#include <limits.h>

int
Sys::getOpenMax()
{
#if HAS_SYSCONF
    return (int) sysconf(_SC_OPEN_MAX);
#elif HAS_GETDTABLESIZE
    return getdtablesize();
#elif HAS_ULIMIT
    return (int) ulimit(UL_GDESLIM, 0);
#else
    return (_POSIX_OPEN_MAX);
#endif
} 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.