Skip to content

Instantly share code, notes, and snippets.

View maleblond's full-sized avatar

Marc-Antoine Leblond maleblond

View GitHub Profile
@maleblond
maleblond / giftimeout.c
Created March 3, 2022 20:52
Segfault on GIF image kill after a timeout
#include <stdio.h>
#include <vips/vips.h>
#include <errno.h>
typedef struct {
void* buf;
size_t len;
} arg_t;
size_t
@maleblond
maleblond / keybase.md
Created February 6, 2019 16:20
keybase.md

Keybase proof

I hereby claim:

  • I am maleblond on github.
  • I am maleblond (https://keybase.io/maleblond) on keybase.
  • I have a public key ASDnDQ2-jowb55I1sgb8Xw-RJIYq9xMSpEQEZkxBu2lcwgo

To claim this, I am signing this object:

const crypto = require('crypto');
const req = {}; // A standard express request, the body is json parsed.
const secret = 'signing-secret'; // 100% sure it's properly set
const { 'messagebird-signature': receivedSignature, 'messagebird-request-timestamp': timestamp } = req.headers;
const bodySum = crypto
.createHash('sha256')
.update(JSON.stringify(req.body))
.digest('hex');