[erlang-patches] Bad format string in erts/emulator/sys/common/erl_check_io.c
Rickard Green
rickard.s.green@REDACTED
Wed Feb 20 12:20:06 CET 2008
Thanks for the patch! It will be included in R12B-2.
BR,
Rickard Green, Erlang/OTP, Ericsson AB.
Matthew Dempsky wrote:
> In large_fd_error_common, erts_dsprintf is called with two %d
> directives but only one integer argument.
>
> --- erl_check_io.c.orig 2008-02-19 23:50:30.000000000 -0800
> +++ erl_check_io.c 2008-02-19 23:51:24.000000000 -0800
> @@ -741,11 +741,11 @@
>
> #ifdef ERTS_SYS_CONTINOUS_FD_NUMBERS
> static void
> -large_fd_error_common(erts_dsprintf_buf_t *dsbufp)
> +large_fd_error_common(erts_dsprintf_buf_t *dsbufp, ErtsSysFdType fd)
> {
> erts_dsprintf(dsbufp,
> "fd=%d is larger than the largest allowed fd=%d\n",
> - max_fds - 1);
> + (int) fd, max_fds - 1);
> }
>
> static void
> @@ -754,7 +754,7 @@
> erts_dsprintf_buf_t *dsbufp = erts_create_logger_dsbuf();
> print_select_op(dsbufp, ix, fd, mode, on);
> erts_dsprintf(dsbufp, "failed: ");
> - large_fd_error_common(dsbufp);
> + large_fd_error_common(dsbufp, fd);
> erts_send_error_to_logger_nogl(dsbufp);
> }
> #endif
> @@ -796,7 +796,7 @@
> erts_dsprintf_buf_t *dsbufp = erts_create_logger_dsbuf();
> print_event_op(dsbufp, ix, fd, event_data);
> erts_dsprintf(dsbufp, "failed: ");
> - large_fd_error_common(dsbufp);
> + large_fd_error_common(dsbufp, fd);
> erts_send_error_to_logger_nogl(dsbufp);
> }
> #endif
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-patches
>
More information about the erlang-patches
mailing list