Comments (3)
I think this occurs because the second parameter of fseek() is not tainted, as it is not derived from the input file.
from nestfuzz.
I'm sorry I missed a line when I uploaded the code, here's the full code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "../dfsan_rt/dfsan_interface.h"
void posix_test()
{
FILE *fd;
fd = fopen("proto.isi", "rb");
fseek(fd, 0, SEEK_END);
int fsize = ftell(fd);
fseek(fd, 0, SEEK_SET);
printf("file size %d\n", fsize);
unsigned char buffer[128];
fread(buffer, sizeof(char), 2, fd);
int offset = (int)buffer[0];
int len = (int)buffer[1];
printf("\n offset is %d, len is %d\n", offset, len);
fseek(fd, offset, SEEK_SET);
fread(buffer, sizeof(char), len, fd);
for(int i=0; i < len; i++)
{
printf("%x ", buffer[i]);
}
printf("\n");
fclose(fd);
}
int main()
{
posix_test();
return 0;
}
from nestfuzz.
I think there is an issue with NestFuzz's modeling of the fseek()
function. We will work on addressing this problem. Thank you!
from nestfuzz.
Related Issues (9)
- target compile issues HOT 5
- Some questions about recurrence HOT 4
- Error in make operation HOT 3
- unexpected results from ipl-modeling tests HOT 1
- Error when compiling libtiff-model HOT 11
- Fail to build GPAC-2.0.0 in the ipl-modeling phase HOT 2
- Error when running a simple test HOT 1
- segmentation fault
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nestfuzz.