Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-10502

Address of a local variable is returned through global variable 'progname'.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • Lustre 2.11.0
    • 3
    • 9223372036854775807

    Description

      6559	static int lfs_mirror(int argc, char **argv)
      6560	{
      6561		char cmd[PATH_MAX];
      6562		int rc = 0;
      6563	 
      6564		setlinebuf(stdout);
      6565	 
      6566		Parser_init("lfs-mirror > ", mirror_cmdlist);
      6567	 
      6568		snprintf(cmd, sizeof(cmd), "%s %s", progname, argv[0]);
      6569		progname = cmd;
      6570		program_invocation_short_name = cmd;
      6571		if (argc > 1)
      6572			rc = Parser_execarg(argc - 1, argv + 1, mirror_cmdlist);
      6573		else
      6574			rc = Parser_commands();
      6575	 
      6576		return rc < 0 ? -rc : rc;
      6577	}
      

      TRACEBACK

      An event which alters the program's state, leading to the defect
      lfs.c:6569: Local address 'cmd' is stored into 'progname'

      An event which alters the program's state, leading to the defect
      lfs.c:6576: 'progname' can be used outside

      Address of a local variable is returned through global variable 'program_invocation_short_name'.
      TRACEBACK

      An event which alters the program's state, leading to the defect
      lfs.c:6570: Local address 'cmd' is stored into 'program_invocation_short_name'

      An event which alters the program's state, leading to the defect
      lfs.c:6576: 'program_invocation_short_name' can be used outside

      Attachments

        Activity

          People

            yujian Jian Yu
            dmiter Dmitry Eremin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: