Socket
Socket
Sign inDemoInstall

symbology

Package Overview
Dependencies
87
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.8 to 3.0.9

9

CHANGELOG.md

@@ -0,1 +1,10 @@

## [3.0.9](https://github.com/jshor/symbology/compare/v3.0.8...v3.0.9) (2022-11-27)
### Bug Fixes
* **svg:** adds fix for SVG/EPS crashes [#96](https://github.com/jshor/symbology/issues/96) ([300a007](https://github.com/jshor/symbology/commit/300a007e0073f32b933a1ced89653dbb40a10ed2))
## [3.0.8](https://github.com/jshor/symbology/compare/v3.0.7...v3.0.8) (2021-11-20)

@@ -2,0 +11,0 @@

4

dist/lib/binary.js

@@ -63,6 +63,2 @@ "use strict";

if (res.code <= 2) {
// remove all data after the trailing EOF marker
res.encodedData = res
.encodedData
.split('<<< EOF >>>')[0];
if (res.code === 0) {

@@ -69,0 +65,0 @@ res.message = 'Symbology successfully created.';

{
"name": "symbology",
"version": "3.0.8",
"version": "3.0.9",
"description": "🔖 Generates 1D, 2D, and composite barcodes in png, svg, or eps formats. Supports 50+ symbologies.",

@@ -52,3 +52,3 @@ "scripts": {

"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.7",
"@mapbox/node-pre-gyp": "^1.0.10",
"git-clone": "^0.1.0",

@@ -55,0 +55,0 @@ "nan": "^2.14.2",

@@ -11,4 +11,4 @@ /**

to: `
struct zint_symbol {
char rendered_data[1000000];
struct zint_symbol {
char rendered_data[1000000];
`

@@ -34,11 +34,3 @@ },

from: /([a-z]+)\s*=\s*stdout;/g,
to: `
#ifndef _MSC_VER
pipe(p);
$1 = fdopen(p[1], "w");
#else
$1 = fopen("NUL", "w");
setvbuf($1, buf, _IOLBF, sizeof(symbol->rendered_data));
#endif
`
to: ''
},

@@ -50,10 +42,18 @@ /* assigns pointer to maintain file buffer */

to: `
int pipe(int fd[2]);
int close(int fildes);
int read(int fildes, void *buf, unsigned nbytes);
INTERNAL int $1_plot$2
char *buf = malloc(sizeof(symbol->rendered_data));
int p[2];`
char str[sizeof(symbol->rendered_data)];
`
},
/* replaces the file buffer allocation with a string one */
{
files: '.zint/**/{svg,ps}.{c,h}',
from: /FILE \*([a-z]+)/g,
to: 'char *$1 = str'
},
/* change file printing to string concatenation */
{
files: '.zint/**/{svg,ps}.{c,h}',
from: /fprintf\(([a-z]+), /g,
to: '$1 += sprintf($1, '
},
/* reads file buffer into symbol->rendered_data */

@@ -63,13 +63,4 @@ {

from: /fflush\(([a-z]+)\);/g,
to: `
fprintf($1, "<<< EOF >>>");
#ifndef _MSC_VER
fflush($1);
close(p[1]);
read(p[0], symbol->rendered_data, sizeof(symbol->rendered_data));
#else
strcpy(symbol->rendered_data, buf);
#endif
`
to: 'strcpy(symbol->rendered_data, str);'
}
]

@@ -74,7 +74,2 @@ import symbology from '../binding'

if (res.code <= 2) {
// remove all data after the trailing EOF marker
res.encodedData = res
.encodedData
.split('<<< EOF >>>')[0]
if (res.code === 0) {

@@ -81,0 +76,0 @@ res.message = 'Symbology successfully created.'

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc