Skip to content
This repository has been archived by the owner. It is now read-only.

Integer values are parsed incorrectly #2

Closed
dvejmz opened this issue Oct 10, 2017 · 1 comment
Closed

Integer values are parsed incorrectly #2

dvejmz opened this issue Oct 10, 2017 · 1 comment

Comments

@dvejmz
Copy link
Contributor

@dvejmz dvejmz commented Oct 10, 2017

Description

Integer values are parsed incorrectly: the first digit of the value is always flipped to the number '1', for instance, this

ssh_port=99

Would be parsed as '19' instead of '99'. I've tried with a few different numbers of different lengths and it seems to always be the first digit which gets changed to be a "1".

I'm quite happy to look at this and submit a PR if you don't have time to investigate it.

Reproduction Steps

  1. Compile the library
  2. Link it into the server_config.c file in the examples directory of this repository.
  3. Run the executable

Expected

Name of main server: honeypot
Please change the port from 99 to a number above 1024

Actual

Name of main server: honeypot
Please change the port from 19 to a number above 1024

Environment

OS: Fedora 26
Kernel version: 4.13.4-200.fc26.x86_64
Compiled with clang 4.0.1

@LloydLabs
Copy link
Owner

@LloydLabs LloydLabs commented Oct 14, 2017

I'll fix this later on, I think I know the issue.

@LloydLabs LloydLabs closed this Oct 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants