I use this code: while ( scanf(\"%s\", buf) == 1 ){ What would be the best way to prevent possible buffer overflow so that it can be passed strings of random lengths?
I am currently attempting to read in Hex values from a text file. There can be multiple lines of Hex\'s and each line can be as long as needed:
package main import ( "bufio" "fmt" "os" "strings" ) func main() { stdin := bufio.NewReader(os.Stdin)