From: | PG Bug reporting form <noreply(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Cc: | starbugs(at)qq(dot)com |
Subject: | BUG #16188: The usage of NULL pointer in rege_dfa.c |
Date: | 2020-01-06 03:20:01 |
Message-ID: | 16188-c632b0d6f863a87e@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 16188
Logged by: Jian Zhang
Email address: starbugs(at)qq(dot)com
PostgreSQL version: 12.1
Operating system: Linux
Description:
We checked the code in file “rege_dfa.c” and there is one error occurring in
line 481. This error is caused by the usage of pointer with NULL value. The
code in this line is “d->work = &d->statesarea[nss * wordsper];” We checked
the code two lines before the error occurred line and the code is
“d->statesarea = (unsigned *) MALLOC((nss + WORK) * wordsper
*sizeof(unsigned));”. We found the code hasn’t checked weather the process
“MALLOC” is success or not which directly define the value of the
“statesarea” field of pointer “d”. This “statesarea” field of pointer “d” is
used later in line 481. The program should check the effectiveness of the
return value of function “MALLOC” to avoid this error.
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2020-01-06 03:37:43 | BUG #16189: The usage of NULL pointer in indexpath.c |
Previous Message | PG Bug reporting form | 2020-01-06 03:02:20 | BUG #16187: The usage of undefined value in parallel.c |