You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm Vietnamese, my English is not good :)
I'm using Clamav 0.98.5, when I build a CUD file with steps follow:
- Step1: run "sigtool --build newdat.cud --unsigned" command
- Step2: enter "version number:"
- Step3: enter "Builder name:"
Then, the sigtool output error that: "Can't get builder name".
I reviewed your code, and found out bug follow:
In 0.98.5 version:
if((pt = getenv("SIGNDUSER")))
{
strncpy(builder, pt, sizeof(builder));
builder[sizeof(builder)-1]='\0';
}
else
{
mprintf("Builder name: ");
if(scanf("%32s", builder) == EOF || !pt)
{
mprintf("!build: Can't get builder name\n");
free(dblist2);
return -1;
}
}
==> I think: if (pt = getenv("SIGNDUSER")) == FALSE, mean is pt = NULL, so if(scanf("%32s", builder) == EOF || !pt) is always true, and program always "return -1"
In 0.98.1 version:
if((pt = getenv("SIGNDUSER")))
{
strncpy(builder, pt, sizeof(builder));
builder[sizeof(builder)-1]='\0';
}
else
{
mprintf("Builder name: ");
if(scanf("%32s", pt) == EOF || !pt)
{
mprintf("!build: Can't get builder name\n");
free(dblist2);
return -1;
}
}
==> with this version, program builds CUD file successfully!
:) I wish you fix this bug as soon as possible, thanks!
The text was updated successfully, but these errors were encountered:
vnpt
changed the title
Building CUD file
Bug on building CUD file
Jan 8, 2015
Hi,
I'm Vietnamese, my English is not good :)
I'm using Clamav 0.98.5, when I build a CUD file with steps follow:
- Step1: run "sigtool --build newdat.cud --unsigned" command
- Step2: enter "version number:"
- Step3: enter "Builder name:"
Then, the sigtool output error that: "Can't get builder name".
I reviewed your code, and found out bug follow:
if((pt = getenv("SIGNDUSER")))
{
strncpy(builder, pt, sizeof(builder));
builder[sizeof(builder)-1]='\0';
}
else
{
mprintf("Builder name: ");
if(scanf("%32s", builder) == EOF || !pt)
{
mprintf("!build: Can't get builder name\n");
free(dblist2);
return -1;
}
}
==> I think: if (pt = getenv("SIGNDUSER")) == FALSE, mean is pt = NULL, so if(scanf("%32s", builder) == EOF || !pt) is always true, and program always "return -1"
if((pt = getenv("SIGNDUSER")))
{
strncpy(builder, pt, sizeof(builder));
builder[sizeof(builder)-1]='\0';
}
else
{
mprintf("Builder name: ");
if(scanf("%32s", pt) == EOF || !pt)
{
mprintf("!build: Can't get builder name\n");
free(dblist2);
return -1;
}
}
==> with this version, program builds CUD file successfully!
:) I wish you fix this bug as soon as possible, thanks!
The text was updated successfully, but these errors were encountered: