Skip to content

Commit

Permalink
Merge pull request #28 from igkvl/master
Browse files Browse the repository at this point in the history
Security patch of rtsp-ffmpeg.js
  • Loading branch information
agsh authored Aug 17, 2018
2 parents 92cf00f + fdcb9fa commit b848a5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rtsp-ffmpeg.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var FFMpeg = function(options) {
this.resolution = options.resolution;
this.quality = (options.quality === undefined || options.quality === "") ? 3 : options.quality;
this.arguments = options.arguments || [];
this.buff = new Buffer(''); // Store the entire data image into this variable. This attribute is replaced each time a full image is received from the stream.
this.buff = Buffer.from(''); // Store the entire data image into this variable. This attribute is replaced each time a full image is received from the stream.

this.on('newListener', newListener.bind(this));
this.on('removeListener', removeListener.bind(this));
Expand Down Expand Up @@ -98,7 +98,7 @@ FFMpeg.prototype.start = function() {

if(offset == "ff" && offset2 == "d9") {
self.emit('data', self.buff);
self.buff = new Buffer('');
self.buff = Buffer.from('');
}
}
});
Expand Down

0 comments on commit b848a5d

Please sign in to comment.