alpine 3.6
obsolete weakness #91

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:

v4l-utils/src/v4l-utils-1.12.5/utils/rds/rds-saa6588.c

Context:

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

 	rc = read(f,b,6);
	if (6 != rc) {
	    fprintf(stderr,"oops: read: rc=%d, expected 6 [%s]\n",
		    rc,strerror(errno));
	    break;
	}
	if (0 == (b[0] & 0x10)) {
	    fprintf(stderr,"no signal\r");
	    continue;
	}
	if (1 == (b[0] & 0x08)) {
	    fprintf(stderr,"overflow detected\n");
	}
	if (1 == (b[0] & 0x04)) {
	    fprintf(stderr,"reset detected\n");
	}
	if (debug)
	    fprintf(stderr,"raw: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n",
		    b[0],b[1],b[2],b[3],b[4],b[5]);
	no = b[0] >> 5;
	if (lastno != no) {
		rds_decode(no, b[1], b[2]);
		lastno = no;
	}
	usleep(10*1000);
    }
    close(f);
    exit(0);
} 

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.