
If you were logged in you would be able to see more operations.
|
|
|
I found a bug in pcc, where an uninitialized variable is used.
Please take a look at following code snippet from file /pcc-1.0.0/arch/hppa/code.c at line 149
void
bfcode(struct symtab **a, int cnt)
{
struct symtab *sp;
NODE *p, *q;
int i, n, sz; /* <-- variable is declared */
if (cftnsp->stype == STRTY+FTN || cftnsp->stype == UNIONTY+FTN) {
/* Function returns struct, adjust arg offset */
for (i = 0; i < n; i++) /*<-- variable n is used uninitialized*/
a[i]->soffset += SZPOINT(LONG);
}
...
}
As you can see, the variable n is used uninitialized!
Best regards
Martin Ettl
|
Description
|
I found a bug in pcc, where an uninitialized variable is used.
Please take a look at following code snippet from file /pcc-1.0.0/arch/hppa/code.c at line 149
void
bfcode(struct symtab **a, int cnt)
{
struct symtab *sp;
NODE *p, *q;
int i, n, sz; /* <-- variable is declared */
if (cftnsp->stype == STRTY+FTN || cftnsp->stype == UNIONTY+FTN) {
/* Function returns struct, adjust arg offset */
for (i = 0; i < n; i++) /*<-- variable n is used uninitialized*/
a[i]->soffset += SZPOINT(LONG);
}
...
}
As you can see, the variable n is used uninitialized!
Best regards
Martin Ettl
|
Show » |
|