Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 166204 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]
suspend-overflow-gentoo.patch
suspend-overflow-gentoo.patch (text/plain), 1.51 KB, created by
ferret
on 2008-09-23 21:28:23 UTC
(
hide
)
Description:
suspend-overflow-gentoo.patch
Filename:
MIME Type:
Creator:
ferret
Created:
2008-09-23 21:28:23 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 2008-09-23 22:20:32.000000000 +0100 >@@ -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; >+ loff_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; >+ loff_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 2008-09-23 22:19:55.000000000 +0100 >@@ -587,7 +587,7 @@ > { > int error = 0; > unsigned int size = sizeof(struct swsusp_header); >- unsigned int shift = (resume_offset + 1) * page_size - size; >+ loff_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; >+ loff_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