alpine 3.6
obsolete weakness #88

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/ir-ctl/ir-ctl.c

Context:

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

         bindtextdomain (PACKAGE, LOCALEDIR);
        textdomain (PACKAGE);
#endif

	argp_parse(&argp, argc, argv, 0, 0, &args);

	if (args.device == NULL)
		args.device = "/dev/lirc0";

	int rc, fd;
	unsigned features;

	fd = open_lirc(args.device, &features);
	if (fd < 0)
		exit(EX_NOINPUT);

	rc = lirc_options(&args, fd, features);
	if (rc)
		exit(EX_IOERR);

	struct file *s = args.send;
	while (s) {
		struct file *next = s->next;
		if (s != args.send)
			usleep(IR_DEFAULT_TIMEOUT);

		rc = lirc_send(&args, fd, features, s);
		if (rc) {
			close(fd);
			exit(rc);
		}

		free(s);
		s = next;
	}

	if (args.record) {
		rc = lirc_record(&args, fd, features);
		if (rc) {
			close(fd);
			exit(rc);
		}
	}

	if (args.features)
		lirc_features(&args, fd, features);

	close(fd);

	return 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.