goni | : bird : Opensource APM Tool for Go | Dashboard library
kandi X-RAY | goni Summary
kandi X-RAY | goni Summary
:bird: Opensource APM Tool for Go
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of goni
goni Key Features
goni Examples and Code Snippets
Community Discussions
Trending Discussions on goni
QUESTION
I am trying to read names from a text file in my code for .c, but I keep getting a segmentation fault from fscanf and can't seem to find out what the problem is.
I tried multiple options, including increasing the char array size, but I have no idea what is wrong, any help would be appreciated.
I also executed this in the DevC++ and it worked, but when I used gcc, it gave me that segfault error.
in main
...ANSWER
Answered 2019-Jun-07 at 06:49I see two reasons which could lead to undefined behaviour.
First, a possible NULL
in infile
; Second, exceeding the buffer size in one of the lines of the file. In order not to change to much of your logic, a quick fix could be:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install goni
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page