FreeBSD Bugzilla – Attachment 231011 Details for
Bug 261205
net/quagga: add some fixes to the port from upstream
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch-pqueue.c: prevent queue corruption when removing the last entry of queues
patch-pqueue.c (text/plain), 484 bytes, created by
Eugene Grosbein
on 2022-01-14 19:38:10 UTC
(
hide
)
Description:
patch-pqueue.c: prevent queue corruption when removing the last entry of queues
Filename:
MIME Type:
Creator:
Eugene Grosbein
Created:
2022-01-14 19:38:10 UTC
Size:
484 bytes
patch
obsolete
>--- lib/pqueue.c.orig 2018-02-20 04:24:55.000000000 +0700 >+++ lib/pqueue.c 2022-01-15 00:17:05.525677000 +0700 >@@ -172,7 +172,10 @@ pqueue_dequeue (struct pqueue *queue) > void > pqueue_remove_at (int index, struct pqueue *queue) > { >- queue->array[index] = queue->array[--queue->size]; >+ if (index == --queue->size) >+ return; /* we're removing the last entry */ >+ >+ queue->array[index] = queue->array[queue->size]; > > if (index > 0 > && (*queue->cmp) (queue->array[index],
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 261205
:
231009
|
231010
| 231011