Skip to content

Instantly share code, notes, and snippets.

Dhaval Kapil DhavalKapil

Block or report user

Report or block DhavalKapil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am dhavalkapil on github.
  • I am dhavalkapil (https://keybase.io/dhavalkapil) on keybase.
  • I have a public key ASC05olYuQRKfgaxTIZVm7Yinc4JjZ7j2e1D_D4WSvXngAo

To claim this, I am signing this object:

View fastbin-loop.c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
int main() {
uintptr_t *p1 = malloc(0);
uintptr_t *p2 = malloc(0);
free(p2);
View overlapping_chunks_smallbin.c
/* Similar to overlapping_chunks.c (from how2heap) with a small change.
* Instead of overwriting size of unsorted chunk, overwrite size of small chunk.
* Now you have to malloc the original size to retrieve this chunk
* Freeing again will now create an overlapped chunk in the unsorted bin which
* can later be retrieved using malloc(corrupt_size);
*/
#include <stdio.h>
#include <stdlib.h>
View ELF-symbol-resolution.md

ELF

ELF Header

The first portion of any ELF file is the ELF header. This generally provides offsets to other headers (program headers and section headers) within an ELF.

typedef struct {
  unsigned char e_ident[EI_NIDENT];
  uint16_t e_type;
You can’t perform that action at this time.