Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sizeOf async version crash! #54

Open
as77c opened this issue Sep 6, 2015 · 5 comments
Open

sizeOf async version crash! #54

as77c opened this issue Sep 6, 2015 · 5 comments

Comments

@as77c
Copy link

as77c commented Sep 6, 2015

sizeOf crash when i submit corrupted file such as changing the extension of exe and make it jpg. It gives the following error
error

It would be much nicer if it returns an error instead of crashing the hole thing :)

Thanks

@AlexanderMatveev
Copy link

+1 in case of wrong file format.
And looks like async callback doesn't trigger at all?

@Alino
Copy link

Alino commented Dec 8, 2015

+1

@Hyperblaster
Copy link

Yeah, Async does not work for me at all.

@t1maccapp
Copy link

There is a checking if input is buffer before checking if callback is a function in index.js file. So, async won't work for buffer input.
image

@priyranjan87
Copy link

binding.read(fd, buffer, offset, length, position, req);

node image-size error coming. This coming because image size is 0
I fixed tough below code

fs.stat(imagePath,function(errCheck, stats)
{
	if( typeof stats !="undefined" && stats.size != 0 )
        {
            //check image dimension
        }

});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants