Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 185590 Details for
Bug 238511
sys-power/suspend contains an overflow bug that stops it working
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
updated patch that should work on 32-bit and 64-bit platforms
suspend-overflow-gentoo.patch (text/plain), 1.51 KB, created by
ferret
on 2009-03-20 01:45:26 UTC
(
hide
)
Description:
updated patch that should work on 32-bit and 64-bit platforms
Filename:
MIME Type:
Creator:
ferret
Created:
2009-03-20 01:45:26 UTC
Size:
1.51 KB
patch
obsolete
>diff -urNd suspend-0.8/resume.c suspend-0.8~/resume.c >--- suspend-0.8/resume.c 2007-12-31 18:50:12.000000000 +0000 >+++ suspend-0.8~/resume.c 2009-03-20 01:24:33.000000000 +0000 >@@ -550,7 +550,7 @@ > struct swsusp_header *swsusp_header) > { > unsigned int size = sizeof(struct swsusp_header); >- unsigned int shift = (resume_offset + 1) * page_size - size; >+ off_t shift = (resume_offset + 1) * page_size - size; > int fd, ret; > > fd = open(resume_dev_name, O_RDWR); >@@ -585,7 +585,7 @@ > char *buffer = (char *)mem_pool + page_size; > unsigned int nr_pages = 0; > unsigned int size = sizeof(struct swsusp_header); >- unsigned int shift = (resume_offset + 1) * page_size - size; >+ off_t shift = (resume_offset + 1) * page_size - size; > char c; > > error = read_area(fd, header, swsusp_header->image, page_size); >diff -urNd suspend-0.8/suspend.c suspend-0.8~/suspend.c >--- suspend-0.8/suspend.c 2007-12-31 18:50:12.000000000 +0000 >+++ suspend-0.8~/suspend.c 2009-03-20 01:24:11.000000000 +0000 >@@ -587,7 +587,7 @@ > { > int error = 0; > unsigned int size = sizeof(struct swsusp_header); >- unsigned int shift = (resume_offset + 1) * page_size - size; >+ off_t shift = (resume_offset + 1) * page_size - size; > > if (lseek(fd, shift, SEEK_SET) != shift) > return -EIO; >@@ -757,7 +757,7 @@ > { > int ret, error = 0; > unsigned int size = sizeof(struct swsusp_header); >- unsigned int shift = (resume_offset + 1) * page_size - size; >+ off_t shift = (resume_offset + 1) * page_size - size; > > if (lseek(fd, shift, SEEK_SET) != shift) > return -EIO;
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 238511
:
166204
| 185590