cmd/nvedit.c: Update input handling to cover overflow cases