Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug on building CUD file #13

Closed
vnpt opened this issue Jan 8, 2015 · 1 comment
Closed

Bug on building CUD file #13

vnpt opened this issue Jan 8, 2015 · 1 comment

Comments

@vnpt
Copy link

vnpt commented 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:

  • 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!

@vnpt vnpt changed the title Building CUD file Bug on building CUD file Jan 8, 2015
@kevlin2
Copy link
Contributor

kevlin2 commented Feb 23, 2015

The bug has been reported to the ClamAV bug tracker. You can access the details of the bug at https://bugzilla.clamav.net/show_bug.cgi?id=11237. The fix will be part of a future release.

Thank you for your contribution to the project!

@vrtadmin vrtadmin closed this as completed Jul 6, 2016
val-ms added a commit that referenced this issue Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants