View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002182 | ardour | bugs | public | 2008-04-07 14:02 | 2008-04-14 11:54 |
| Reporter | jwrdegoede | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 2.1 | ||||
| Summary | 0002182: PATCH: fix a nullpointer dereference | ||||
| Description | This patch fixes a possible null pointer dereference / illigal memory access which can happen when allocating a 0 bytes block. | ||||
| Tags | No tags attached. | ||||
|
2008-04-07 14:02
|
ardour-session.cc-no_stomp.patch (610 bytes)
--- libs/ardour/session.cc~ 2006-05-14 09:53:33.000000000 -0700 +++ libs/ardour/session.cc 2006-05-14 10:20:11.000000000 -0700 @@ -3218,7 +3218,8 @@ #endif _passthru_buffers.push_back (p); - *p = 0; + if (current_block_size > 0) + *p = 0; #ifdef NO_POSIX_MEMALIGN p = (Sample *) malloc(current_block_size * sizeof(Sample)); @@ -3228,7 +3229,8 @@ memset (p, 0, sizeof (Sample) * current_block_size); _silent_buffers.push_back (p); - *p = 0; + if (current_block_size > 0) + *p = 0; #ifdef NO_POSIX_MEMALIGN p = (Sample *) malloc(current_block_size * sizeof(Sample)); |
|
|
I don't think this patch is required as of 2.0-ongoing@2983(before 2.3) which prevents trying to allocate a 0 byte size block in Session::ensure_passthru_buffers |
|
|
> I don't think this patch is required as of 2.0-ongoing@2983(before 2.3) which > prevents trying to allocate a 0 byte size block in > Session::ensure_passthru_buffers That could be very well possible (I didn't write this patch, I'm merely forwarding it), still it can't hurt to double check. |
|
|
The patch is no longer needed as of rev 2.0-ongoing@2983 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2008-04-07 14:02 | jwrdegoede | New Issue | |
| 2008-04-07 14:02 | jwrdegoede | File Added: ardour-session.cc-no_stomp.patch | |
| 2008-04-08 11:12 | timbyr | Note Added: 0004843 | |
| 2008-04-08 11:16 | jwrdegoede | Note Added: 0004844 | |
| 2008-04-14 11:54 | timbyr | Status | new => closed |
| 2008-04-14 11:54 | timbyr | Note Added: 0004860 | |
| 2008-04-14 11:54 | timbyr | Resolution | open => fixed |