Suggestion from web: correct work with struct sockaddr_in
- Dominant language
- C++
- Stars
- 8.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Correctly handle this source from a user on all architectures/compilers/optimizations:
```c
#include
#include
#include
#include
int main(int argc, char **argv) {
struct sockaddr_in addr;
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
addr.sin_port = htons(123);
int mysocket = socket(AF_INET, SOCK_STREAM, 0);
connect(mysocket, (struct sockaddr *)&addr, sizeof(struct sockaddr));
return 0;
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
No source file, test, or entry point is named. Start by locating the RetDec code that handles this sockaddr_in example, then reproduce the supplied program across architectures, compilers, and optimization levels; done means it is handled correctly in each requested configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp
- Domain
- compilers, reverse-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100