FreeBSD Bugzilla – Attachment 168724 Details for
Bug 208275
Kernel panic when reading from /dev/cd0 with a damaged dvd
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
cd9660_read(): In case of read errors, don't dereference bp which may be NULL
cd9660_read-In-case-of-read-errors-don-t-dereference-bp.diff (text/plain), 891 bytes, created by
Fabian Keil
on 2016-03-28 09:57:06 UTC
(
hide
)
Description:
cd9660_read(): In case of read errors, don't dereference bp which may be NULL
Filename:
MIME Type:
Creator:
Fabian Keil
Created:
2016-03-28 09:57:06 UTC
Size:
891 bytes
patch
obsolete
>From 72a5b18b9d9553dbbe0f951b44fe084c2db9c3eb Mon Sep 17 00:00:00 2001 >From: Fabian Keil <fk@fabiankeil.de> >Date: Sat, 26 Mar 2016 14:34:43 +0100 >Subject: [PATCH] cd9660_read(): In case of read errors, don't dereference bp > which may be NULL > >PR: 208275 >Obtained from: ElectroBSD >--- > sys/fs/cd9660/cd9660_vnops.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c >index 47d4f75..c6d7cbd 100644 >--- a/sys/fs/cd9660/cd9660_vnops.c >+++ b/sys/fs/cd9660/cd9660_vnops.c >@@ -341,11 +341,12 @@ cd9660_read(ap) > } else > error = bread(vp, lbn, size, NOCRED, &bp); > } >- n = MIN(n, size - bp->b_resid); > if (error) { >- brelse(bp); >+ if (bp != NULL) >+ brelse(bp); > return (error); > } >+ n = MIN(n, size - bp->b_resid); > > error = uiomove(bp->b_data + on, (int)n, uio); > brelse(bp); >-- >2.7.4 >
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 208275
:
168591
|
168592
| 168724 |
168755