Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144688433
D30945.id91522.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
537 B
Referenced Files
None
Subscribers
None
D30945.id91522.diff
View Options
Index: lib/libpfctl/libpfctl.c
===================================================================
--- lib/libpfctl/libpfctl.c
+++ lib/libpfctl/libpfctl.c
@@ -748,6 +748,9 @@
size_t new_size = nv.size +
(nv.size * states->count / (found_count + 1) * 2);
+ /* Assume at least 2K per state. */
+ new_size = MAX(2048 * states->count, new_size);
+
/* Our buffer is too small. Estimate what we need based
* on how many states fit in the previous allocation
* and how many states there are. Doubled for margin.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 12, 4:05 AM (18 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28663691
Default Alt Text
D30945.id91522.diff (537 B)
Attached To
Mode
D30945: libpfctl: improve DIOCGETSTATESNV size estimation
Attached
Detach File
Event Timeline
Log In to Comment