Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107292426
D40428.id122870.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
656 B
Referenced Files
None
Subscribers
None
D40428.id122870.diff
View Options
diff --git a/sys/opencrypto/criov.c b/sys/opencrypto/criov.c
--- a/sys/opencrypto/criov.c
+++ b/sys/opencrypto/criov.c
@@ -404,16 +404,16 @@
void *
crypto_cursor_segment(struct crypto_buffer_cursor *cc, size_t *len)
{
+ if (cc->cc_buf_len == 0) {
+ *len = 0;
+ return (NULL);
+ }
switch (cc->cc_type) {
case CRYPTO_BUF_CONTIG:
*len = cc->cc_buf_len;
return (cc->cc_buf);
case CRYPTO_BUF_MBUF:
case CRYPTO_BUF_SINGLE_MBUF:
- if (cc->cc_mbuf == NULL) {
- *len = 0;
- return (NULL);
- }
if (cc->cc_mbuf->m_flags & M_EXTPG)
return (m_epg_segment(cc->cc_mbuf, cc->cc_offset, len));
*len = cc->cc_mbuf->m_len - cc->cc_offset;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 13, 2:31 AM (14 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15775224
Default Alt Text
D40428.id122870.diff (656 B)
Attached To
Mode
D40428: opencrypto: Handle end-of-cursor conditions in crypto_cursor_segment()
Attached
Detach File
Event Timeline
Log In to Comment