pacparser 1.5.3__tar.gz → 1.5.3.dev1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pacparser
3
- Version: 1.5.3
3
+ Version: 1.5.3.dev1
4
4
  Summary: Pacparser package
5
5
  Home-page: https://github.com/manugarg/pacparser
6
6
  Author: Manu Garg
@@ -99,7 +99,8 @@ read_file_into_str(const char *filename)
99
99
  if (file_size == -1) goto error2;
100
100
  if (fseek(fptr, 0L, SEEK_SET) != 0) goto error2;
101
101
 
102
- char *str = (char*) malloc(file_size+1);
102
+ // calloc zero-fills the buffer, so the string is already NUL-terminated.
103
+ char *str = (char*) calloc(file_size+1, 1);
103
104
  if (str == NULL) goto error2;
104
105
 
105
106
  // Read the file into the string
@@ -109,12 +110,6 @@ read_file_into_str(const char *filename)
109
110
  goto error2;
110
111
  }
111
112
 
112
- // This check should not be needed but adding this satisfies
113
- // sonarlint static analysis, otherwise it complains about tainted
114
- // index.
115
- if (bytes_read < file_size+1) {
116
- str[bytes_read] = '\0';
117
- }
118
113
  fclose(fptr);
119
114
  return str;
120
115
  error2:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pacparser
3
- Version: 1.5.3
3
+ Version: 1.5.3.dev1
4
4
  Summary: Pacparser package
5
5
  Home-page: https://github.com/manugarg/pacparser
6
6
  Author: Manu Garg
@@ -0,0 +1 @@
1
+ VERSION=1.5.3.dev1
@@ -1 +0,0 @@
1
- VERSION=1.5.3
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes