validate char value length == 1
This commit is contained in:
		
							parent
							
								
									0ae78b60d9
								
							
						
					
					
						commit
						cb4dbce82d
					
				@ -1114,6 +1114,9 @@ static int ptql_branch_add(ptql_parse_branch_t *parsed,
 | 
			
		||||
      case PTQL_VALUE_TYPE_CHR:
 | 
			
		||||
        branch->match.chr = ptql_op_chr[branch->op_name];
 | 
			
		||||
        if (!is_set) {
 | 
			
		||||
            if (strlen(parsed->value) != 1) {
 | 
			
		||||
                return SIGAR_PTQL_MALFORMED_QUERY;
 | 
			
		||||
            }
 | 
			
		||||
            branch->value.chr[0] = parsed->value[0];
 | 
			
		||||
        }
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user