Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 44433 Details for
Bug 66553
(toolchain) artsdsp stack smashing attack in function read()
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Simple testcase
libtester.c (text/x-csrc), 768 bytes, created by
Malte S. Stretz
on 2004-11-21 13:55:51 UTC
(
hide
)
Description:
Simple testcase
Filename:
MIME Type:
Creator:
Malte S. Stretz
Created:
2004-11-21 13:55:51 UTC
Size:
768 bytes
patch
obsolete
>#define _GNU_SOURCE 1 > >#include <stdlib.h> >#include <stdio.h> >#include <stdarg.h> >#include <string.h> >#include <dlfcn.h> > >typedef ssize_t (*orig_read_ptr)(int fd, void *buf, size_t count); >static orig_read_ptr orig_read; > >static int libtester_initialized = 0; > > >static void libtester_init() >{ > if (libtester_initialized) return; > fprintf(stderr, "init(): in\n"); > orig_read = (orig_read_ptr)dlsym(RTLD_NEXT, "read"); > libtester_initialized = 1; > fprintf(stderr, "init(): out\n"); >} > >ssize_t read (int fd, void *buf, size_t count) >{ > int r; > fprintf(stderr, "read(%d, %p, %d): in\n", fd, buf, count); > libtester_init(); >#if 1 > r = orig_read(fd, buf, count); >#else > memset(buf, 0, count); > r = count; >#endif > fprintf(stderr, "read(): out\n"); > return r; >}
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 Raw
Actions:
View
Attachments on
bug 66553
:
41237
|
41509
|
44433
|
44434
|
49002
|
49140
|
49141
|
49142