Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 295548 Details for
Bug 433784
aliasing violation causes dumpe2fs segfaults in ia64.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
backported upstream patch
Fix-type-punning-bugs-in-ext2fs_get_mem-and-ext2fs.patch (text/plain), 1.71 KB, created by
Flavio Leitner
on 2008-02-21 18:37:04 UTC
(
hide
)
Description:
backported upstream patch
Filename:
MIME Type:
Creator:
Flavio Leitner
Created:
2008-02-21 18:37:04 UTC
Size:
1.71 KB
patch
obsolete
>Index: e2fsprogs-1.35/lib/ext2fs/badblocks.c >=================================================================== >--- e2fsprogs-1.35.orig/lib/ext2fs/badblocks.c >+++ e2fsprogs-1.35/lib/ext2fs/badblocks.c >@@ -43,7 +43,7 @@ static errcode_t make_u32_list(int size, > bb->size = size ? size : 10; > bb->num = num; > retval = ext2fs_get_array(bb->size, sizeof(blk_t), &bb->list); >- if (!bb->list) { >+ if (retval) { > ext2fs_free_mem(&bb); > return retval; > } >Index: e2fsprogs-1.35/lib/ext2fs/ext2fs.h >=================================================================== >--- e2fsprogs-1.35.orig/lib/ext2fs/ext2fs.h >+++ e2fsprogs-1.35/lib/ext2fs/ext2fs.h >@@ -967,11 +967,12 @@ extern blk_t ext2fs_inode_data_blocks(ex > */ > _INLINE_ errcode_t ext2fs_get_mem(unsigned long size, void *ptr) > { >- void **pp = (void **)ptr; >+ void *pp; > >- *pp = malloc(size); >- if (!*pp) >+ pp = malloc(size); >+ if (!pp) > return EXT2_ET_NO_MEMORY; >+ memcpy(ptr, &pp, sizeof (pp)); > return 0; > } > _INLINE_ errcode_t ext2fs_get_array(unsigned long count, unsigned long size, void *ptr) >@@ -986,10 +987,12 @@ _INLINE_ errcode_t ext2fs_get_array(unsi > */ > _INLINE_ errcode_t ext2fs_free_mem(void *ptr) > { >- void **pp = (void **)ptr; >+ void *p; > >- free(*pp); >- *pp = 0; >+ memcpy(&p, ptr, sizeof(p)); >+ free(p); >+ p = 0; >+ memcpy(ptr, &p, sizeof(p)); > return 0; > } > >@@ -1003,11 +1006,11 @@ _INLINE_ errcode_t ext2fs_resize_mem(uns > > /* Use "memcpy" for pointer assignments here to avoid problems > * with C99 strict type aliasing rules. */ >- memcpy(&p, ptr, sizeof (p)); >+ memcpy(&p, ptr, sizeof(p)); > p = realloc(p, size); > if (!p) > return EXT2_ET_NO_MEMORY; >- memcpy(ptr, &p, sizeof (p)); >+ memcpy(ptr, &p, sizeof(p)); > return 0; > } > #endif /* Custom memory routines */
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 433784
:
295505
| 295548