alpine 3.6
obsolete weakness #81

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/dvb/dvb-fe-tool.c

Context:

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

 			p = buf;
			len = sizeof(buf);
		}
	}

	fflush(fd);

	return 0;
}

static void get_show_stats(struct dvb_v5_fe_parms *parms)
{
	int rc;

	signal(SIGTERM, do_timeout);
	signal(SIGINT, do_timeout);

	do {
		rc = dvb_fe_get_stats(parms);
		if (!rc)
			print_frontend_stats(stderr, parms);
		if (count > 0 && !--count)
			break;
		if (!timeout_flag)
			usleep(1000000);
	} while (!timeout_flag);
}

static const char const *event_type[] = {
	[DVB_DEV_ADD] = "added",
	[DVB_DEV_CHANGE] = "changed",
	[DVB_DEV_REMOVE] = "removed",
};

static int dev_change_monitor(char *sysname,
			       enum dvb_dev_change_type type)
{
	if (type > ARRAY_SIZE(event_type))
		printf("unknown event on device %s\n", sysname);
	else
		printf("device %s was %s\n", sysname, event_type[type]);
	free(sysname);

	return 0;
}

int main(int argc, char *argv[])
{
	struct dvb_device *dvb;
	struct dvb_dev_list *dvb_dev; 

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.