Z3R0 on Nostr: #programmers #devs #code This function converts an integer to a string. Is this code ...
#programmers #devs #code
This function converts an integer to a string. Is this code safe? I want to make sure there are no memory leaks, buffer overflows, or risks of overflow during conversion. My biggest concerns are related to the usage of malloc; this is one of my first times using it. Did I handle it correctly?
Published at
2024-02-04 00:14:06Event JSON
{
"id": "19268f6fb250ca0cc98b1302774cc2f27859ab9ff4e425a42d846c1c88ad5f3a",
"pubkey": "6cbf39af6cd7453b05afc53274ce74205ff3ab5fb508462aeac14c8554b8afa1",
"created_at": 1707005646,
"kind": 1,
"tags": [
[
"imeta",
"url https://image.nostr.build/1432dc649b88b657e7db39ee1f0ca4b04187b88dd4903b2e0e1281e7f95ea3a8.jpg",
"blurhash e52t3cyDVXRObHYkcFibivkCctb_Z#iwkCpdb^VraJj[k=g3aJena}",
"dim 1168x1904"
],
[
"t",
"programmers"
],
[
"t",
"devs"
],
[
"t",
"code"
],
[
"r",
"https://image.nostr.build/1432dc649b88b657e7db39ee1f0ca4b04187b88dd4903b2e0e1281e7f95ea3a8.jpg"
]
],
"content": "#programmers #devs #code\nThis function converts an integer to a string. Is this code safe? I want to make sure there are no memory leaks, buffer overflows, or risks of overflow during conversion. My biggest concerns are related to the usage of malloc; this is one of my first times using it. Did I handle it correctly? https://image.nostr.build/1432dc649b88b657e7db39ee1f0ca4b04187b88dd4903b2e0e1281e7f95ea3a8.jpg ",
"sig": "a3c0705ff0b9c5b9d8b303610ecfe1f72b15cc5d81803a31eb1602b554984c851d3131d41ae8de3a89cae165facf207d03d9afeb78a925930095bf6374fd5251"
}