Klaus Demo nginx / 0ac5764
gRPC: fixed possible sign extension of error and setting_value. All cases are harmless and should not happen on valid values, though can result in bad values being shown incorrectly in logs. Found by Coverity (CID 1430311, 1430312, 1430313). Maxim Dounin 1 year, 6 months ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
32113211 switch (state) {
32123212
32133213 case sw_start:
3214 ctx->error = ch << 24;
3214 ctx->error = (ngx_uint_t) ch << 24;
32153215 state = sw_error_2;
32163216 break;
32173217
33243324 break;
33253325
33263326 case sw_error:
3327 ctx->error = ch << 24;
3327 ctx->error = (ngx_uint_t) ch << 24;
33283328 state = sw_error_2;
33293329 break;
33303330
35543554 break;
35553555
35563556 case sw_value:
3557 ctx->setting_value = ch << 24;
3557 ctx->setting_value = (ngx_uint_t) ch << 24;
35583558 state = sw_value_2;
35593559 break;
35603560