alpine 3.6
obsolete weakness #87

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/dvbv5-zap.c

Context:

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

 #ifdef O_LARGEFILE
					O_LARGEFILE |
#endif
					O_WRONLY,
					0644);
			if (file_fd < 0) {
				PERROR(_("open of '%s' failed"),
					args.filename);
				err = -1;
				goto err;
			}
			copy_to_file(dvr_fd, file_fd, args.timeout, args.silent);
		} else {
			if (!timeout_flag)
				fprintf(stderr, _("DVR interface '%s' can now be opened\n"), args.dvr_fname);

			get_show_stats(&args, parms, 1);
		}
		if (args.silent < 2)
			get_show_stats(&args, parms, 0);
	} else {
		/* Wait until timeout or being killed */
		while (1) {
			get_show_stats(&args, parms, 1);
			usleep(1000000);
		}
	}
	err = 0;

err:
	if (args.confname)
		free(args.confname);
	dvb_dev_free(dvb);

	return err;
} 

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.