Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 100787 Details for
Bug 153434
media-video/nvclock-0.8b2 crashes if exist loaded kernel module with name >= 20 characters
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix for crashing bug
backlinux.patch (text/plain), 1016 bytes, created by
Raimonds Cicans
on 2006-10-30 05:20:34 UTC
(
hide
)
Description:
Fix for crashing bug
Filename:
MIME Type:
Creator:
Raimonds Cicans
Created:
2006-10-30 05:20:34 UTC
Size:
1016 bytes
patch
obsolete
>Solves following bug: >nvclock crashes if exist loaded module with name >= 20 characters > SOLUTION: to prevent stack smashing variables 'buffer' & 'name' MUST be of same size > >Signed-off-by: Raimonds Cicans <ray@apollo.lv> > >diff -ur old/nvclock0.8b2/src/backend/back_linux.c nvclock0.8b2/src/backend/back_linux.c >--- old/nvclock0.8b2/src/backend/back_linux.c 2006-01-12 23:36:47.000000000 +0200 >+++ nvclock0.8b2/src/backend/back_linux.c 2006-10-30 11:54:13.000000000 +0200 >@@ -43,18 +43,19 @@ > static void unmap_dev_mem (unsigned long Base, unsigned long Size); > > /* Check if we are using the closed source Nvidia drivers */ >+#define MODNAME_BUF_SIZE 80 > static int check_driver() > { > FILE *proc; >- char buffer[80]; >+ char buffer[MODNAME_BUF_SIZE]; > > proc = fopen("/proc/modules", "r"); > > if(proc != NULL) > { >- while(fgets(buffer, 80, proc) != NULL) >+ while(fgets(buffer, MODNAME_BUF_SIZE, proc) != NULL) > { >- char name[20]; >+ char name[MODNAME_BUF_SIZE]; > int size; > int used; >
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 153434
: 100787