看板 FB_bugs 關於我們 聯絡資訊
The following reply was made to PR bin/186697; it has been noted by GNATS. From: oliver <oliver@beefrankly.org> To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/186697: calendar(1): -A -B -t not working correctly Date: Sun, 16 Feb 2014 01:13:31 +0100 --MP_/wl6N.RZXvRZ5J9CjM=wVyF. Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline added a possible patch as attachment. --MP_/wl6N.RZXvRZ5J9CjM=wVyF. Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=patch.txt --- /usr/src/usr.bin/calendar/calendar.c 2014-01-16 21:36:28.000000000 +0100 +++ calendar.c 2014-02-16 01:07:06.000000000 +0100 @@ -96,10 +96,18 @@ case 'A': /* days after current date */ f_dayAfter = atoi(optarg); + if (f_dayAfter < 0) { + errno = EINVAL; + err(1, NULL); + } break; case 'B': /* days before current date */ f_dayBefore = atoi(optarg); + if (f_dayBefore < 0) { + errno = EINVAL; + err(1, NULL); + } break; case 'D': /* debug output of sun and moon info */ --MP_/wl6N.RZXvRZ5J9CjM=wVyF.-- _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"