| Revision 4253,
782 bytes
checked in by sam, 3 years ago
(diff) |
|
Fix copyright information and remove Id tag everywhere.
|
| Line | |
|---|
| 1 | /* |
|---|
| 2 | * bug-memory - program exhausting the memory when fuzzed |
|---|
| 3 | * Copyright (c) 2008 Sam Hocevar <sam@hocevar.net> |
|---|
| 4 | * All Rights Reserved |
|---|
| 5 | * |
|---|
| 6 | * This program is free software. It comes without any warranty, to |
|---|
| 7 | * the extent permitted by applicable law. You can redistribute it |
|---|
| 8 | * and/or modify it under the terms of the Do What The Fuck You Want |
|---|
| 9 | * To Public License, Version 2, as published by Sam Hocevar. See |
|---|
| 10 | * http://sam.zoy.org/wtfpl/COPYING for more details. |
|---|
| 11 | */ |
|---|
| 12 | |
|---|
| 13 | #include "config.h" |
|---|
| 14 | |
|---|
| 15 | #include <stdio.h> |
|---|
| 16 | #include <stdlib.h> |
|---|
| 17 | |
|---|
| 18 | int main(void) |
|---|
| 19 | { |
|---|
| 20 | int i, ch; |
|---|
| 21 | |
|---|
| 22 | while((ch = getc(stdin)) != EOF) |
|---|
| 23 | { |
|---|
| 24 | char *tmp = malloc(1 + ch * 1024 * 1024); |
|---|
| 25 | for(i = 0; i < 1024; i++) |
|---|
| 26 | tmp[ch * 1024 * i] = i; |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | return EXIT_SUCCESS; |
|---|
| 30 | } |
|---|
| 31 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.