403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.238
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/sysutils/deltup/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/sysutils/deltup/files/patch-bzip2.cpp
--- bzip2.cpp.orig	2007-03-25 01:59:24.000000000 +0300
+++ bzip2.cpp	2013-10-06 17:12:16.000000000 +0400
@@ -19,6 +19,8 @@
 #include "system.h"
 #include "tmpstore.h"
 #include "bzip2.h"
+#include <stdio.h>
+#include <stdlib.h>
 
 char *bzip2_compressor_name[MAX_BZIP2_COMPRESSORS] = {"0.9.0c", "1.0.2", "1.0.3", "1.0.4"};
 char *bzip2_name[MAX_BZIP2_COMPRESSORS] = {NULL, NULL, NULL, NULL};
@@ -31,14 +33,12 @@
   system(command.c_str());
 
   FILE * fp;
-  char * line = NULL;
+  char line[2*CHAR_MAX];
   string fname;
-  size_t len = 0;
-  ssize_t read;
   fp = fopen(tempfile.c_str(), "r");
   if (fp == NULL)
        exit(EXIT_FAILURE);
-  while ((read = getline(&line, &len, fp)) != -1) {
+  while (fgets(line, 2*CHAR_MAX, fp)!=NULL) {
 //                 printf("Retrieved line of length %zu :\n", read);
 //                 printf("%s", line);
        char *v = strstr(line, "Version");
@@ -56,8 +56,8 @@
        }
        fname = line;
   }
-  if (line)
-       free(line);
+//  if (line)
+//      free(&line);
   if (verbose) {
     printf("found bzip2 compressors/decompressors:\n");
     for (int i = 0; i < MAX_BZIP2_COMPRESSORS; ++i) {

Youez - 2016 - github.com/yon3zu
LinuXploit