Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1487#discussion_r176479622
  
    --- Diff: core/conn/odbc/src/odbc/nsksrvr/SrvrMain.cpp ---
    @@ -1427,7 +1437,59 @@ BOOL getInitParamSrvr(int argc, char *argv[], 
SRVR_INIT_PARAM_Def &initParam, ch
                                argEmpty = TRUE;
                                break;
                        }
    -           }
    +           }else
    +        if (strcmp(arg, "-TCPKEEPALIVESTATUS") == 0){
    +            if (++count < argc && argv[count][0] != '-')
    +            {
    +                if (strlen(argv[count]) < sizeof(keepaliveStatus) - 1)
    +                {
    +                    memset(keepaliveStatus, 0, sizeof(keepaliveStatus));
    +                    strncpy(keepaliveStatus, argv[count], 
sizeof(keepaliveStatus));
    +                }
    +                else
    +                {
    +                    argWrong = TRUE;
    +                }
    +            }
    +            else
    +            {
    +                argEmpty = TRUE;
    +                break;
    +            }
    +        }else
    +        if (strcmp(arg, "-TCPKEEPALIVEIDLETIME") == 0){
    +                   if (++count < argc )
    +                   {
    +                           keepaliveIdletime = atoi(argv[count]);
    --- End diff --
    
    If argv[count] isn't numeric, you'll get zero here. Or if it is a string 
like '123xyz456', you will get  123 here. Is this OK? Or would you rather have 
something more robust? Similar comments apply to the other parameters below.


---

Reply via email to