Date: Sun, 16 Aug 2015 13:59:49 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 202326] libteken assert() fail and result in kernel panic Message-ID: <bug-202326-8-sGqcuhW9Qy@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-202326-8@https.bugs.freebsd.org/bugzilla/> References: <bug-202326-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202326 --- Comment #7 from commit-hook@freebsd.org --- A commit references this bug: Author: ed Date: Sun Aug 16 13:59:12 UTC 2015 New revision: 286827 URL: https://svnweb.freebsd.org/changeset/base/286827 Log: Pick UINT_MAX / 100 as an upperbound. The fix that I applied in r286798 is already good, but it assumes that sizeof(int) > sizeof(short). Express the upperbound in terms of UINT_MAX. By dividing that by 100, we're sure that the resulting value is never larger than approximately UINT_MAX / 10, which is safe. PR: 202326 Discussed with: kcwu csie org MFC after: 1 month Changes: head/sys/teken/teken.c -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-202326-8-sGqcuhW9Qy>