Bug 431150 - [PATCH] Fix a crash when deleting and adding rows
[PATCH] Fix a crash when deleting and adding rows
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: gtk+extra (Show other bugs)
8
All Linux
medium Severity high
: ---
: ---
Assigned To: Alain Portal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-31 20:26 EST by Miloslav Trmač
Modified: 2008-04-16 23:56 EDT (History)
0 users

See Also:
Fixed In Version: 2.1.1-6.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-16 23:54:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Make sure sheet->maxallocrow does not point to deallocated rows (523 bytes, patch)
2008-01-31 20:26 EST, Miloslav Trmač
no flags Details | Diff

  None (edit)
Description Miloslav Trmač 2008-01-31 20:26:21 EST
Version-Release number of selected component (if applicable):
gtk+extra-2.1.1-6

Steps to Reproduce:
Kind of difficult.  Basically, delete rows from the end of a GtkSheet, then
re-add them.

When a GtkSheet is initialized, sheet->maxrow == 0 && sheet->maxallocrow == 1. 
After adding some rows, sheet->maxrow == N && sheet->maxallocrow == N+1.

Then, deleting M rows from the end will clear data for all rows from (N-M+1) on,
and eventually sheet->maxrow is set to (N-M), but sheet->maxallocrow is,
incorrectly, decremented only to (N-M+1).

Later, when more rows are added to the end using gtk_sheet_insert_row(), data
for the row (N-M+1) is not allocated again, and InsertRow() crashes in the loop
that attempts to update cell->row when dereferencing a NULL pointer.
Comment 1 Miloslav Trmač 2008-01-31 20:26:21 EST
Created attachment 293676 [details]
Make sure sheet->maxallocrow does not point to deallocated rows
Comment 2 Fedora Update System 2008-04-07 05:32:38 EDT
gtk+extra-2.1.1-6.fc7 has been submitted as an update for Fedora 7
Comment 3 Fedora Update System 2008-04-07 05:37:42 EDT
gtk+extra-2.1.1-7.fc8 has been submitted as an update for Fedora 8
Comment 4 Alain Portal 2008-04-07 05:42:08 EDT
Sorry for a so late answer.
Thanks for the patch, I just commited it on F7, F8 and devel.

Here as the links to tell if the updates work for you
https://admin.fedoraproject.org/updates/F7/pending/gtk+extra-2.1.1-6.fc7
https://admin.fedoraproject.org/updates/F8/pending/gtk+extra-2.1.1-7.fc8
Comment 5 Fedora Update System 2008-04-09 01:15:00 EDT
gtk+extra-2.1.1-6.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gtk+extra'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F7/FEDORA-2008-2923
Comment 6 Fedora Update System 2008-04-16 23:54:38 EDT
gtk+extra-2.1.1-6.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2008-04-16 23:56:19 EDT
gtk+extra-2.1.1-7.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.