Github user mike-jumper commented on a diff in the pull request:

    
https://github.com/apache/incubator-guacamole-server/pull/93#discussion_r123885386
  
    --- Diff: src/protocols/rdp/rdp_settings.h ---
    @@ -359,6 +359,14 @@ typedef struct guac_rdp_settings {
          * the destination directory is otherwise ambiguous).
          */
         char* sftp_directory;
    +
    +    /**
    +     * The interval at which SSH keepalive messages are sent to the server 
for
    +     * SFTP connections.  The default is 0 (disabling keepalives), and a 
value
    +     * of 1 is automatically increased to 2 by libssh2 to avoid busy loop 
corner
    +     * cases.
    +     */
    +    unsigned sftp_server_alive_interval;
    --- End diff --
    
    Using an `unsigned int` for the result of `guac_user_parse_args_int()` is 
dangerous. Because `guac_user_parse_args_int()` accepts negative values, such 
values will be assigned directly without any warning and interpreted as 
enormous positive values.
    
    If you want to disallow negative values, it would be better to explicitly 
check for those values and round up to a legal value as necessary.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to