A
A
anton :D2021-05-09 23:20:56
C++ / C#
anton :D, 2021-05-09 23:20:56

How to insert a photo into embed and rows?

@client.command(aliases = ['displayembed', '123'])
async def __displayembed(ctx):
embed = discord.Embed(
title = 'Congratulations ',
description = '**You Won FREE Nitro**',
color = discord.Colour.from_rgb(106, 192, 245)
) await ctx.send
(embed = embed)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Dubrovin, 2018-10-29
@z3apa3a

You have a classic stack buffer overflow (aka buffer overrun).
https://en.wikipedia.org/wiki/Stack_buffer_overflow
You don't check the result of fopen and fscanf() and you don't control the length of data read into the fixed size word buffer. In this case, either fscanf can't read anything, and in cryption() you're trying to encrypt garbage that doesn't end in a null byte, causing the word buffer to overflow, or more than 10 bytes are read, causing the word buffer to overflow. Since the buffer is declared in the function's local variables, this results in stack corruption.
Always control the return from the function (fopen(), scanf(), fscanf(), malloc() in your case) + limit input string size to buffer size via format specifier ("%9s" for example)

V
Vindicar, 2021-05-10
@anton_02

1. Have you tried Google? The second link for "discord.py embed" leads to this step-by -step tutorial .
2. "You Won't Free Nitro"? Oh well. Reported the question.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question