Permalink
Browse files

- port is unsigned. (fixes crash if you attempted to use a port >32768)

  • Loading branch information...
1 parent 4ca3b78 commit b23310a75bddc0ca9fb082654b6c0cc3682c7ae7 @jordansissel jordansissel committed Feb 6, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 emitter.h
  2. +1 −1 lumberjack.c
View
2 emitter.h
@@ -9,7 +9,7 @@ struct emitter_config {
size_t window_size; /* the window size */
char *host;
- short port;
+ unsigned short port;
};
void *emitter(void *arg);
View
2 lumberjack.c
@@ -173,7 +173,7 @@ int main(int argc, char **argv) {
emitter_config.host = strdup(optarg);
break;
case opt_port:
- emitter_config.port = (short)atoi(optarg);
+ emitter_config.port = (unsigned short)atoi(optarg);
break;
case opt_window_size:
emitter_config.window_size = (size_t)atoi(optarg);

0 comments on commit b23310a

Please sign in to comment.