/*
- * Copyright (C) 2018 "IoT.bzh"
+ * Copyright (C) 2018, 2019 "IoT.bzh"
* Author: José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
}
/* not found, create it */
- ph = malloc(len + sizeof *ph);
+ ph = malloc(1 + len + sizeof *ph);
if (!ph)
return -1;