New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integer values are parsed incorrectly #2

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

Comments

Projects
None yet
2 participants
@dvejmz
Copy link
Contributor

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

This comment has been minimized.

Copy link
Owner

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 join this conversation on GitHub. Already have an account? Sign in to comment