File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1683,7 +1683,8 @@ CopyReadAttributesText(CopyFromState cstate)
16831683 strncmp (start_ptr , cstate -> opts .null_print , input_len ) == 0 )
16841684 cstate -> raw_fields [fieldno ] = NULL ;
16851685 /* Check whether raw input matched default marker */
1686- else if (cstate -> opts .default_print &&
1686+ else if (fieldno < list_length (cstate -> attnumlist ) &&
1687+ cstate -> opts .default_print &&
16871688 input_len == cstate -> opts .default_print_len &&
16881689 strncmp (start_ptr , cstate -> opts .default_print , input_len ) == 0 )
16891690 {
@@ -1897,7 +1898,8 @@ CopyReadAttributesCSV(CopyFromState cstate)
18971898 strncmp (start_ptr , cstate -> opts .null_print , input_len ) == 0 )
18981899 cstate -> raw_fields [fieldno ] = NULL ;
18991900 /* Check whether raw input matched default marker */
1900- else if (cstate -> opts .default_print &&
1901+ else if (fieldno < list_length (cstate -> attnumlist ) &&
1902+ cstate -> opts .default_print &&
19011903 input_len == cstate -> opts .default_print_len &&
19021904 strncmp (start_ptr , cstate -> opts .default_print , input_len ) == 0 )
19031905 {
You can’t perform that action at this time.
0 commit comments