Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9123835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:26:10+00:00 2026-06-17T06:26:10+00:00

You might call me crazy after reading this post, but I would really request

  • 0

You might call me crazy after reading this post, but I would really request you to trust me when you read what I say here. In my attempt to understand situations where memory leak or other errors could be caused, I wrote the following code and tried compiling on my pc,

#include <iostream>

using namespace std;

class game
{
   int x;

   public : 
   char *s;
   char read();
   char manipulation();
};

char game :: read()
{
   char string[100];
   cout<<"Enter name ";
   cin>>string;
   s = string;
   cout<<"Name is "<<&s<<endl;
}

int main()
{ 
   game games,games1;
  // games.read();
   cout<<"Name is "<<games.s<<endl;
   return 0;
}

If i execute games.read() in my main, my anti-virus software BITDEFENDER shows me the following error, “BITDEFENDER has detected an infected item in c:/c++/inline.exe. Virus name : Gen:Variant.Graftor.51542. The file was disinfected for your protection”

inline.cpp is the name of my program.
If i remove that line “games.read()”, it compiles fine. Is the pointer causing a memory leak somewhere?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:26:12+00:00Added an answer on June 17, 2026 at 6:26 am

    Your anti-virus program just found a use-after-free vulnerability.

    string is a local array.
    You can’t use it after read() exits.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I feel like this might be a crazy question, and if anyone has a
I'd like to make something you might call a dynamic folder which would contain
I want to call a function but depending on the situation I might call
How might you call a Lisp program from a Rails application?... For example, allow
I'm trying to make a call that might throw an exception due to server
I'm lost. How might I pass a loop variable to an AJAX .done() call?
Might be my question sounds more naive. But I wanted to know if it
Might be my question is abstract or out of context, but i am asking
Might be a bit of noob question but it's something that's been getting me
might be a stupid question but I seem to be confused. Im pretty new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.