Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175102381
D60426.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
528 B
Referenced Files
None
Subscribers
None
D60426.diff
View Options
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c
--- a/lib/libthr/thread/thr_mutex.c
+++ b/lib/libthr/thread/thr_mutex.c
@@ -865,7 +865,7 @@
case PTHREAD_MUTEX_RECURSIVE:
/* Increment the lock count: */
- if (m->m_count + 1 > 0) {
+ if (m->m_count < INT_MAX) {
m->m_count++;
ret = 0;
} else
@@ -934,7 +934,7 @@
case PTHREAD_MUTEX_RECURSIVE:
/* Increment the lock count: */
- if (m->m_count + 1 > 0) {
+ if (m->m_count < INT_MAX) {
m->m_count++;
ret = 0;
} else
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 9, 6:57 AM (5 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40392533
Default Alt Text
D60426.diff (528 B)
Attached To
Mode
D60426: libthr: Do not rely on UB in counter
Attached
Detach File
Event Timeline
Log In to Comment