> +
> +             if (ferror(pin)) {
> +                     LM_ERR("writing pipe: %s\n", strerror(errno));
> +                     ser_error=E_EXEC;
> +                     goto error;
> +             }
> +             pclose(pin);
> +     }
> +
> +     schedule_to_kill(pid);
> +     wait(&exit_status);
> +
> +     if (outvar) {
> +             while (fgets(tmpbuf, MAX_LINE_SIZE, pout)) {
> +                     tmplen = strlen(tmpbuf);
> +                     memcpy(buf+buflen, tmpbuf, tmplen);

Who checks that buf doesn't overflow? And use fread instead of fgets, since you 
don't care about there the line feeds are.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/360/files#r18957149
_______________________________________________
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to